Skip to Content
Former Member
Aug 21, 2008 at 01:59 PM

SAP B1 Query


I am creating a slow moving inventory report. When I leave the where clause out of the subselects, it works. But I need the date criteria to filter transactions. Does anyone have an idea why this doesn't work?

SELECT T0.ItemCode, T0.ItemName, T0.OnHand, T0.IsCommited, T0.OnOrder, T0.LastPurPrc FROM OITM T0

Where T0.ItemCode not in (Select T2.ItemCode from DLN1 T2 where T2.DocDate >= [%0])

and T0.ItemCode not in (Select T3.ItemCode from IGN1 T3 where T3.DocDate >=[%0])

and T0.ItemCode not in (Select T4.ItemCode from IGE1 T4 where T4.DocDate >=[%0])

and T0.OnHand<>0 and T0.InvntItem='Y'