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)
 invalid length parameter passed to the substring

Author  Topic 

DURGESH
Posting Yak Master

105 Posts

Posted - 2008-06-27 : 00:10:14
hi all,
good morning

i am getting following error when using substring function

Server: Msg 536, Level 16, State 3
Invalid length parameter passed to the substring function.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-06-27 : 00:12:18
Well you've passed an invalid length to the substring function. We can't provide any more details without you giving us more information.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-06-27 : 00:12:34
meaning one of the parameter you pass to the substring is < 0


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

DURGESH
Posting Yak Master

105 Posts

Posted - 2008-06-27 : 02:12:12
the string passing to the substring function is not properly enclosed in a quotes
eg @str='str1','str2'

correct string:
@str='str1'',''str2'
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-06-27 : 02:19:46
quote:
Originally posted by DURGESH

the string passing to the substring function is not properly enclosed in a quotes
eg @str='str1','str2'

correct string:
@str='str1'',''str2'


Are you telling that this caused the error?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-06-27 : 09:41:03
quote:
Originally posted by DURGESH

the string passing to the substring function is not properly enclosed in a quotes
eg @str='str1','str2'

correct string:
@str='str1'',''str2'


Post the full code that caused the error

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -