Hi,
As the heading states I am trying to write a query that will return a list of sales orders (within a date range) that have products on there that are part of a template BOM - here is what I have thus far:
SELECT T0.[DocNum], T0.[DocDate]
FROM [dbo].[ORDR] T0 INNER JOIN [dbo].[RDR1] T1 ON T0.DocEntry = T1.DocEntry INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode INNER JOIN OITT T3 ON T2.ItemCode = T3.Code INNER JOIN ITT1 T4 ON T3.Code = T4.Father
WHERE T4.[Father] = [%2] and T0.[DocDate] between [%0] and [%1]
I do this and select the BOM name and date range - but it doesn't return anything.
Any help with this would be greatly appreciated.
Thanks
Rick