Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Macro substitute equivalent in SQLServer 6.5
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Macro substitute equivalent in SQLServer 6.5
Divers
Thread ID:
00232108
Message ID:
00232108
Vues:
40
Is there a way to do equivalent of macro substitution in SQL-Server

I have a stored procedure for a specific database to retrieve 101 records from a table (50 prior to given key, key record, 50 after the given key value)

Since you can't use the command

USE (other database name)

within a stored procedure, I need the ability to tell it which database to get the data out of, and also for create cursor/fetch.

ex:
ClientDatabase_A - CustomerTable
ClientDatabase_B - CustomerTable
..
..
ClientDatabase_C - CustomerTable

Also, depending on the parameters passed in (which I already have under control), I may need to look at a different table and fields
for selection. The principle can still apply but for "inventory items" instead of the CustomerTable..

Any help would be greatly appreciated,
TIA
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform