SP_ExecuteSQL | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive


I use SP_ExecuteSQL to execute dynamic SQL statement. But it is limited to 4000 characters (NVARCHAR(4000)). Usually my dynamic SQL statement is longer than 4000 characters. How to solve it?
create a view to reduce the size of the query
http://www.sommarskog.se/dynamic_sql.html —
Frank Kalis
Microsoft SQL Server MVP
Heute schon gebloggt?http://www.insidesql.de/blogs
Ich unterstuetze PASS Deutschland e.V. http://www.sqlpass.de)
Use the EXECUTE command using VARCHAR(8000) May the Almighty God bless us all!