Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL help
Message
De
08/04/1999 23:32:57
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00206209
Message ID:
00206771
Vues:
18
Whew --- I was trapped in meeting hell all day today and I couldn't help you with the syntax problem....glad to see it all worked out.

>Silly me. Did not realize that vfp comes with a query wizard. These little scraps of knowledge are difficult to learn when you are new to a language and noone you with with knows the language. thank god for UT. Got the query working. Thanks for your help
>
>>I'll check the syntax when I get back to my office in 30 mins or so....
>
>>>I get a syntax error. do you see any problems with the SELECT?
>
>>>>SELECT taddress.*,tcustomer.custname AS custcustname FROM taddress LEFT INNER JOIN tcustomer ON taddress.custnum = tcustomer.custnum WHERE taddress.custname # tcustomer.custname
>>>>
>>>>The result set will be one record per address record that does not match it's parent's custname value.
>
>>>>>Have two tables, lets say tcustomer and taddress. Each tcustomer can have many taddress. The unique custnum is in both tables. taddress also has addrseq to make it unique. Unfortunately custname is in both tables (bad design), and some bug has allowed the tcustom.custname to not equal taddress.custname for the same custnum.
>>>>>
>>>>>Want an SQL to find all the records in taddress where the custname does not match tcustomer.custname? Tried
>>>>>
>>>>>select obligat.name from obligor obligat where obligor.obligor = obligat.obligor and obligor.name <> obligat.name
>>>>
>>>>but I guess the one to many of the table relationship makes it return an empty result set.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform