Reputation: 11
I have a query in that was partially setup in SAP Hana. I need to get it in Crystal but only partial is working.
Basically I have a table that has AR Invoice sales and a table that has onhand inventory. I need some guidance to show the results for the onhand inventory, if there are no entries in the sales query.
This sums the total quantity sold for AR Invoices by item number - it works fine. SELECT T1."ItemCode", T1."Dscription", SUM(T1."Quantity") AS "Quantity", T0."CANCELED" FROM OINV T0 INNER JOIN INV1 T1 ON T0."DocEntry" = T1."DocEntry" WHERE T0."CANCELED" = 'N' GROUP BY T1."ItemCode",T1."Dscription", T0."CANCELED" ORDER BY T1."ItemCode")
I have another query that pulls the onhand inventory SELECT T1."ItemCode", T1."Dscription",T0."Onhand" FROM OITW T0 WHERE T0."Onhand" > 0
What I need is a query that will show these columns if the record is NOT in the 1st query. I basically need it to show any items that have onhand inventory but no sales
"ItemCode", "Dscription", "Onhand"
Any help would be appreciated, I am on a deadline with this and I am completely stuck.
Upvotes: 0
Views: 10