>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.