I am getting really stuck on the syntax for a subselect of a pass thru. Can anyone please assist?
Here is the original Pass Thru:
SELECT icWhseItem.*
FROM DOMDATA.PUB.icWhseItem
WHERE icWhseItem.CoNum = '001' AND icWhseItem.WHSE = 'WH1' AND icWhseItem.NonStock = 0 AND icwhseItem.itemnum in ('C5315X20X24','C5315X24')
Here is what I have for the subselect version:
SELECT icWhseItem.*, (SELECT a.onhandqty
FROM icwhseItem a
WHERE a.itemnum = q_PT_icWhseItem_Test.itemnum and a.whse = 'RTL')
FROM DOMDATA.PUB.icWhseItem
WHERE icWhseItem.CoNum = '001' AND icWhseItem.WHSE = 'WH1' AND icWhseItem.NonStock = 0 AND icwhseItem.itemnum in ('C5315X20X24','C5315X24')
Any help would be fantastic!
Here is the original Pass Thru:
SELECT icWhseItem.*
FROM DOMDATA.PUB.icWhseItem
WHERE icWhseItem.CoNum = '001' AND icWhseItem.WHSE = 'WH1' AND icWhseItem.NonStock = 0 AND icwhseItem.itemnum in ('C5315X20X24','C5315X24')
Here is what I have for the subselect version:
SELECT icWhseItem.*, (SELECT a.onhandqty
FROM icwhseItem a
WHERE a.itemnum = q_PT_icWhseItem_Test.itemnum and a.whse = 'RTL')
FROM DOMDATA.PUB.icWhseItem
WHERE icWhseItem.CoNum = '001' AND icWhseItem.WHSE = 'WH1' AND icWhseItem.NonStock = 0 AND icwhseItem.itemnum in ('C5315X20X24','C5315X24')
Any help would be fantastic!
Last edited: