Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL syntax question
Message
 
À
14/12/2004 15:51:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00969260
Message ID:
00969765
Vues:
10
I believe you can use the following (I am not on a machine with VFP so syntax may be a little off but this is the technique)

assumes following:
1. both a and b have same or similar fields if only similar then would have to request fields rather than use *

2. there is a key value common to both a and b call it x

then can create following sql:

select * from a ;
union ;
select * from b where not x in (select distinct x from a)

Please check above against the valid VFP syntax but that will retrieve all fields in a and all fields in b where x is in b but not in a.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform