Pass Thru with a Subselect

nag

Joined
Mar 25, 2011
Messages
1
Reaction score
0
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!
 
Last edited:

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top