Hello,
I am working on a report in which i need department wise order details for current month
report should showed all departments and although ordered qty is null for one or department
for that i am using below query
SELECT distinct T0.[OcrCode],Isnull(Sum(T0.[Quantity]) ,0) AS 'Booking As on date in Current Month', Isnull( Sum( T0.[opencreqty]) ,0) As 'TOTAL PENDING' FROM RDR1 T0 INNER JOIN ORDR T1 ON T0.[DocEntry] = T1.[DocEntry] WHERE T0.[OcrCode] <>'Store' and T0.[OcrCode] <>'mktg' and T0.[OcrCode] <>'acct' and DateDiff(MM,T0.DocDate,Getdate())=0 GROUP BY T0.[OcrCode]
But it is not working showing only those departments which has ordered quantity