Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP / Macro substitution / SQL Equivalent
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01029644
Message ID:
01029695
Views:
15
>>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.

Sergey
What cooling method do you use for your brain when you go to sleep? My guess is you need at least Phase Change...Even watercooling can't deal with the heating you must be producing :-)
Jaime
Why do programs stop working correctly as soon as you leave the Fox?
Previous
Reply
Map
View

Click here to load this message in the networking platform