Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Vfp Stored procedure help
Message
From
07/01/2004 17:23:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/01/2004 16:38:09
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00864863
Message ID:
00864881
Views:
12
>Hello all
>
>I have 12 tables say empJan,empFeb,empMar...empDec.how can i get the data for the range that user specifies. for eg if user selects JAN..MAY, i need to get data into one cursor. right now i use procedure code to do this, is it possible thru SQL/ Stored Procedures.

Lots of things are much easier if you have data for the entire year, or better for several years, in a single table. However, if your tables are very large, this may be impractical, especially if you use VFP native tables.

You can combine data vertically, from similar tables, with a SELECT - UNION. Assuming the tables have identical structures:
select * from JAN;
  UNION select * from FEB;
  into cursor Temp
In general, the two (or more) parts of the UNION must be identical with respect to fields: same fields in the same order, same sizes.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Reply
Map
View

Click here to load this message in the networking platform