Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL help
Message
De
07/04/1999 16:46:05
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00206209
Message ID:
00206223
Vues:
14
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.
>>>
>>>Any help is appreciated.
>>>
>>>Brenda
------------------------------------------------
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform