I build a sql-statement and put it in a local variable so i can execute it using sp_executesql, but a local variable cannot be a text or ntext data type, and a varchar data type cannot be used by sp_executesql. So the maximum lenght of the statement cannot be more than nvarchar(4000)...
is there any work around?
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!