July 5, 2009 at 10:15 pm
I have a stored procedure with a variable with type nvarchar(max) to store the sql for executei(exec sp_executesql).... but i found my sql statement is too long(over the size of nvarchar(max)) . is there anyway i can solve this problem.
is anyone can give me a hand?
July 5, 2009 at 10:30 pm
edl0022 (7/5/2009)
I have a stored procedure with a variable with type nvarchar(max) to store the sql for executei(exec sp_executesql).... but i found my sql statement is too long(over the size of nvarchar(max)) . is there anyway i can solve this problem.is anyone can give me a hand?
Are you sure it's the size of the string that's an issue? This has a capacity of 2GB... if your string is bigger than this, you need to look seriously at trimming this down.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 5, 2009 at 10:54 pm
Hi there,
We'd have to take a look at your SP. In case you're not passing more than 2 GB size parameter you might have used another varchar variable with lesser size and concatenated in the varchar(max) variable , but this is just a guess.
July 6, 2009 at 12:02 am
thks guy for giving help, i found the problem is not the size limit to the nvarchar(max). it is missing part of the sql during execute....
i am still checking where is the problem....
July 7, 2009 at 4:27 am
Hi, there is a post on the same topic on the SQL2005 part of the forum, with the solution:
http://www.sqlservercentral.com/Forums/Topic747429-145-1.aspx
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply