Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need help with simple SELECT - SQL command
Message
De
08/02/2002 12:00:32
Lutz Scheffler (En ligne)
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00617474
Message ID:
00617491
Vues:
28
Hi Sergey;

Surprise! 3 seconds faster! I'm proud as a peacook. <s>
A good reason to go on weekend now! (It's 6pm anyway)

Agnes

>
SELECT state FROM table2 ;
>  WHERE State NOT IN (SELECT state FROM table1)
>* or using correlated query
>SELECT state FROM table2 ;
>  WHERE NOT EXISTS (SELECT state FROM table1 WHERE state = table2.state )
>
>
>
>>All I want to do is select records from two tables by looking at one field in each table. I want to find what states in table 2 are not in table 1. What would the SELECT- SQL command look like to do this? THANKS!
>>
>>For example lets say Table 1 is my working table with state records in it.
>>NY
>>NJ
>>FL
>>CA
>>TX
>>
>>Table 2 is a table with all the states in it.
>>AL
>>AK
>>AR
>>... and so on
>>WV
>>WY
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform