Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_executesql

Status
Not open for further replies.

kevinluk

Programmer
Aug 18, 2003
3
US
I use the sp_executesql to run my dynamic sql within the T-SQL stored procedure, but it blows up when my sql statement grows beyond 4000 bytes limitation. Any idea that I can get around with this limitation? Thanks.

Kevin
 
Have you tried just using the execute method?

Create Proc ABC
as
execute('Select some long col list and joins with huge joins')
 
The other way is to break the statement up into mutiple variables and then concatenate them inthe exec.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top