Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dynamic SQL Stored in a field
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01099394
Message ID:
01099407
Vues:
16
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform