Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple SQL?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01287483
Message ID:
01287552
Vues:
9
>>>What would be the syntax to get the ctrl#,item from 2 like tables where customer='JONES'? My syntax returns duplicates from table 2.
>>>
>>>SELECT a.ctrl,a.item,b.ctrl,b.item FROM e:csu8 a , e:csu7 b ;
>>>WHERE a.cust_name = b.cust_name AND a.cust_name='JONES'
>>Try
>>
>>SELECT ctrl, item FROM table1 WHERE cust_name='JONES' ;
>>UNION ALL
>>SELECT ctrl, item FROM table2 WHERE cust_name='JONES' ;
>>INTO CURSOR crsResult
>>
>
>Yes thanks, this worked. but in the examples on the net, it doesn't explain this method(that I could find).

In your original select you tried to combine two tables horisontally.

In Sergey's select it's combining them vertically. Check Select-SQL in Help.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform