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)
 Whit is the limit of string in exec()

Author  Topic 

heze
Posting Yak Master

192 Posts

Posted - 2006-04-09 : 22:12:37
Hi,

does enybody know what is the limit for the sze of the string
that con go inside exec?
ie
datalenght(@v1)=8000
datalenght(@v2)=8000
datalenght(@vn)=8000
exec(@v1+@v2+..+@vn)

what is n? thank you

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-04-09 : 22:40:59
bad side of me...
syntax error...unable to process your question

good side of me...
your teacher must not like you at all, giving value to @vn like that... tell your teacher it's indeterminate...

--------------------
keeping it simple...
Go to Top of Page

heze
Posting Yak Master

192 Posts

Posted - 2006-04-09 : 22:48:38
bad side of me:
Place for jokes:The bar with friends and some beers
Place for jokes if no friends and dislike bar: The Yahoo forum
Not a place for jokes: This forum

Good side of me:
I want to know what is the aximum number of maxed out varchars that can be appended as the exec parameter.
I need help

thanks
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-04-09 : 22:50:33
Run a test, and let us know what you find.





CODO ERGO SUM
Go to Top of Page

heze
Posting Yak Master

192 Posts

Posted - 2006-04-09 : 22:52:49
I will, actually I am in the process of Michael
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2006-04-09 : 22:55:09
it is syntax error, it's not a joke...
QA should be able to highlight this for you

from BOL
quote:

n

Is a placeholder indicating that the preceding item(s) can be repeated multiple times. For example, EXECUTE can specify one or more @parameter, value, or @variable items.



it's not indicated in BOL if there's a limit for execute statements, but you can always challenge this by testing it out, unless you encountered truncation somewhere

--------------------
keeping it simple...
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-04-10 : 01:44:39
"it's not indicated in BOL if there's a limit for execute statements"

But I reckon there's going to be a problem concatenating multiple varchar(8000) ...

Kristen
Go to Top of Page
   

- Advertisement -