Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with a union statement
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00596962
Message ID:
00596969
Vues:
27
This message has been marked as the solution to the initial question of the thread.
>I am trying to create a union but I keep getting the message that the thing is union compatable. The two tables have an identical field structure layout:
>Any help appricated.
>
>
>
>
>SELECT Meetings.begintime, Meetings.pname, ;
>  Meetings.p2name,  Meetings.p3name, Meetings.surgeon,;
>  Meetings.plname, Meetings.pfname,;
>  Meetings.comments, Meetings.meetingnumber, Meetings.patientphone,;
>  Meetings.dob;
> FROM  sched!meetings ;
> WHERE Meetings.date BETWEEN ?gd_startd AND ?gd_Endd;
>   AND Meetings.dept = ?gcDept ;
>UNION ALL ;
>SELECT BLOCKS.begintime, BLOCKS.pname, ;
>  BLOCKS.p2name , BLOCKS.p3name , BLOCKS.surgeon,;
>  BLOCKS.plname,BLOCKS.pfname,;
>  BLOCKS.comments, BLOCKS.meetingnumber, BLOCKS.patientphone,;
>  BLOCKS.dob;
> FROM  sched!BLOCKS ;
> WHERE BLOCKS.date BETWEEN ?gd_startd AND ?gd_Endd;
>   AND BLOCKS.dept = ?gcDept
>
>
>identical field structure layout

Just for clarification. Are do the 2 tables have the same data type in the corresponding fields (so we're not unioning memos and character, or different numeric types), and does each field have precisely the same length, and in the case of VFP numerics, the same number of decimal places?

Jay
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform