Information générale
Catégorie:
Codage, syntaxe et commandes
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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement