Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic SQL Stored in a field
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01099394
Message ID:
01099407
Views:
17
>See if you can use sp_executesql system stored procedure. Notice, that it expects ntext (not text) as parameter.
>
>>Is there a way to EXECUTE an sql statement stored in TEXT field w/o need to declare bunch of variables?
>>Because this script is very long (about 200K) I stored it in Text Field but I want to execute it. Now I declare about 25 variables (varchar (8000)) to read this field in them and then:
>>EXEC (@sql1+@sql2...)
>>maybe I missing something

Thank you. I'll try.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform