April 17, 2008 at 3:25 pm
I have to break dynamic query into two as it was more than 4000 characters long.
I have to use Execute(@nsql_1 + ' ' + @nsql_2) now
how can I use two parameters to use sp_executesql?
EXECUTE @error = sp_executesql @nsql, N'@min_date SMALLDATETIME,@max_date SMALLDATETIME',@min_date,@max_date
Thanks for help....
April 17, 2008 at 7:42 pm
I don't think you can. Build your parameters inline with your sql, and use the straight EXEC command instead of sp_executesql.
April 18, 2008 at 5:42 am
Ah yes, varchar(Max). Sorry, I was still in SQL 2000 land...
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply