Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Dynamic SQL Size Restriction??

Author  Topic 

Nate
Starting Member

17 Posts

Posted - 2002-04-01 : 18:27:46
Is there a limit on the size of dynamic SQL statement that will be executed? When my statement reaches a certain size, SQL will not execute it. Does anyone have any insight on this?

Thanks.

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2002-04-01 : 18:39:25
Hi

The statement will be limited by the number of characters you can fit in your variable, which is probably 8000.

Damian
Go to Top of Page

Nate
Starting Member

17 Posts

Posted - 2002-04-01 : 18:40:48
Thanks. I should have thought of that...

Go to Top of Page

motokevin
Starting Member

36 Posts

Posted - 2002-04-04 : 12:10:57
Nate,

Dont forget that you can also say:

Exec (sql1 + sql2 + sql3 + ...)

with sql1, sql2, and sql3 and so on all being size 8000

Go to Top of Page
   

- Advertisement -