Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select w/ Union
Message
 
 
À
06/05/1999 16:44:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00215861
Message ID:
00215865
Vues:
26
>Hi all,
>
>Trying to join two cursors so that the result is one cursor with all the records for both. This is the easiest type of union, but I simply cannot remember how it works. What I am doing is resulting in no records selected -- so that's wrong.
>
>SELECT ;
>    FField1 AS Field1, ;
>    FField2 AS Field2  ;
>    FROM myTable1      ;
 <b>union</b>
>SELECT ;
>    BField1 AS Field1, ;
>    BField2 AS Field2  ;
>    FROM myTable2      ;
>INTO CURSOR myCursor2 NOFILTER
>
What is the syntax to merge myCursor1 and myCursor2 such that all records in both cursors are included in the merged table?
>
>Thanks for your help.
>
>regards,

you left out the union and field1 and field 2 have to be the same data types in both selects. Any Order by, Group by and into cursor clauses have to be issued once and must be at the end of the last select.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform