General information
Category:
Coding, syntax & commands
I need to list all the master inventory table (plus the details) where a specific stock appear in the details table.
The following SQL shows me the result except that 'suppid' becomes 'cardno'.
What's wrong?
SELECT cardmst.cardno, cardmst.card_date, cardmst.suppid, ;
carddet.stkcode, carddet.qty, carddet.price ;
FROM cardmst JOIN carddet ;
ON cardmst.cardid=carddet.cardid ;
WHERE cardmst.cardno IN ( ;
SELECT DISTINCT cardmst.cardno ;
FROM cardmst JOIN carddet ;
ON cardmst.cardid=carddet.cardid ;
WHERE carddet.stkcode='1' )
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only