Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL problem
Message
 
À
01/07/1997 01:42:35
Shihchau Tai
Apic Systems Pte Ltd
Singapore, Singapour
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00038196
Message ID:
00038283
Vues:
45
> 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'. > > 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' ) You mean that the cardmst.cardno values show up in the suppid column? This doesn't make any sense. IAC, try chopping down the statement, one clause at a time, until the problem goes away. First remove the WHERE cluse, then remove the carddet table. /Paul
Paul Russell
EMail: prussell@fox.nstn.ca
Phone: (902) 499-5043
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform