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

Query To Display Components Not In A BOM Or Production Order

$
0
0

Hello All

I am trying to write a query that will display any components that isn't in any BOM's or Open production Orders

The query should only display Item codes that belong to the ItemGroupCode = 287 and should display item codes which are on hand

 

I have written the below, but doesn't work

 

Hoping someone can point me or guide me in the right direction

 

SELECT T0.[ItemCode],

T0.[ItemName],

T0.[OnHand],

(T0.[OnHand] * T0.[AvgPrice]) as 'Value Of Stock'

 

FROM OITM T0  INNER JOIN ITT1 T1 ON T0.ItemCode = T1.Code INNER JOIN WOR1 T2 ON T0.ItemCode = T2.ItemCode

 

WHERE T0.[ItemCode] not in T1.[Code] and  T2.[ItemCode] and T0.[ItmsGrpCod] = 287 and  T0.[OnHand] >= 1

 

ORDER BY T0.[ItemName]

 

Thanks and Regards

Rahul


Viewing all articles
Browse latest Browse all 3576

Trending Articles