Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL problem
Message
From
01/07/1997 01:42:35
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapore
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQL problem
Miscellaneous
Thread ID:
00038196
Message ID:
00038196
Views:
94
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
Map
View

Click here to load this message in the networking platform