Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP / Macro substitution / SQL Equivalent
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01029644
Message ID:
01029652
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>Does SQL Server have the capability of storing a stored procedure in a varchar or text field and then calling that stored procedure from another (currently executing) stored procedure.
>
>I'm looking for an equivalent to VFP'c ability to use macrosubtitution to store program logic in a variable and then execute it when desired.
>

You can use dynamic SQL with EXECUTE command or sp_executesql stored procedures. See Re: Using a variable in the FROM clause of a SELECT Message #877130 and Re: Dynamic SQL Thread #907431, for example. Check also How to return a value from dynamicaly executed T-SQL code FAQ #8130.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform