Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp Stored procedure help
Message
De
07/01/2004 17:23:01
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/01/2004 16:38:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00864863
Message ID:
00864881
Vues:
11
>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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform