Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9656

Trying to write a query that will return sales orders that have products that are part of a template BOM

$
0
0

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


Viewing all articles
Browse latest Browse all 9656

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>