>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)