Execute large sql (>8000 chars)
With a dynamic sql script under 4000 chars use sp_executesql With under 8000 chars write it to a variable.For anything longer you can use this script. Use UpdateText and WriteText to write your dynamic sql to a text/ntext field in a table somewhere and then pass its location to this script.
2003-09-01
596 reads