Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left Join/Union
Message
De
02/02/2001 13:26:01
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Left Join/Union
Divers
Thread ID:
00471894
Message ID:
00471894
Vues:
70
Hi All,

I'm trying to construct a SQL statement that will produce a result that contains all the INSURED records that have a matching Required record with a ins_type of "GENL". The following gives me a Union incompatible error. The only example in the books and Q89181 use the NOT IN instead of =. Does it make that much difference? Any help will be appreciated. TIA.

Regards,

Paige

SELECT INSURED.Cli_id, INSURED.Ins_id, REQUIRED.Cli_id, REQUIRED.Ins_id ;
FROM INSURED, REQUIRED ;
Where INSURED.Cli_id+INSURED.Ins_id=Required.Cli_ID+Required.Ins_Id ;
UNION ;
SELECT Required.Cli_ID, Required.Ins_Id ;
FROM Required ;
Where Required.Ins_Type="GENL" ;
(Select Required.Cli_ID, Required.Ins_Id FROM Required)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform