Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp Stored procedure help
Message
 
 
À
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:
00864883
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.

It is possible through SP/SQL, however, your code in a SP would most likely look about the same as what you use in your Procedure code. The SQL would look something like:
SELECT * from empJan WHERE ...
UNION
SELECT * from empFeb WHERE ...
...
UNION
SELECT * from empMay WHERE ...
ORDER BY
INTO CURSOR crsResults
This assumes each table structure is IDENTICAL. This SQL you can generate programmatically based on the user input.
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform