Notifications
Clear all
Feb 21, 2023 8:31 pm
Câu query áp dụng cho môi trường SAP HANA:
SELECT T0."DocNum" AS "Invoice Number", T2."DocNum" AS "Credit Memo Number"
FROM OINV T0
INNER JOIN INV1 T1 ON T1."DocEntry" = T0."DocEntry"
INNER JOIN ORIN t2 ON t2."ObjType" = T1."TargetType"
INNER JOIN RIN1 t3 ON T3."DocEntry" = T2."DocEntry" AND T3."BaseEntry" = T0."DocEntry"
GROUP BY T0."DocNum", T2."DocNum" ORDER BY T0."DocNum";