Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with a union statement
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00596962
Message ID:
00596969
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform