Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INTERSECT
Message
De
15/07/2000 13:10:45
Walter Meester
HoogkarspelPays-Bas
 
 
À
15/07/2000 09:36:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00392861
Message ID:
00392892
Vues:
11
Grigore,

>Please, can anyone tell me how can I simulate INTERSECT clause of an SQL interogation?


SELECT * FROM Table1 UNION Select * FROM Table2 INTO CURSOR x
SELECT * FROM x UNION ALL SELECT * FROM Table3 INTO CURSOR y
SELECT * FROM Y GROUP BY allfields... HAVING COUNT(*) = 2

would produce the desired result if in each table there is an existing primary key (so multiple exact same records cannot exist in one table).

I have not tried it, but you might be able to combine statement 2 and 3 to:

SELECT * FROM x UNION ALL SELECT * FROM Table3 GROUP BY allfields... HAVING COUNT (*) = 2

Hope this helps

Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform