Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Correct statement
Message
De
30/06/2006 13:10:46
Chris Bohling
Myers and Stauffer LC
Shawnee, Kansas, États-Unis
 
 
À
30/06/2006 13:03:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01133122
Message ID:
01133123
Vues:
14
>Hi all,
>I want to extract some names from a table 'x' with a 'where' clause, but only if the names are present in another table 'y'. For example: select name, surname from x where dimessa=0 .and.... (when the name and surname is present in the y table) into cursor mycursor.
>Any idea about the correct statement sql?

One way to do it:
SELECT ... FROM x
   WHERE ... AND name+surname IN (SELECT name+surname FROM y)
   INTO ...
You might need to adjust the name+surname expression to make sure you get an exact match.

Chris
Christopher Bohling, Consultant
http://www.ChristopherBohling.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform