TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft SQL Server

SQLServer Error: 536, Invalid length parameter passed to the SUBST

Microsoft SQL Server

 
 
Thread Tools Display Modes
Unread 29-10-2007, 08:09 PM   #1
JackO
Guest
 
Posts: n/a
SQLServer Error: 536, Invalid length parameter passed to the SUBST

I am trying to run an SSIS package from SQL Server 2005 Standard Edition with
SP2 and I am getting the following error: 'SQLServer Error: 536, Invalid
length parameter passed to the SUBSTRING function. [SQLSTATE 42000]'. I am
storing the packages in the SQL Server database and I have setup credentials
for a user called 'PDAT' and have setup a Proxy using the credentials of the
user. Any help or suggestions would be appreciated.

 
Unread 30-10-2007, 08:02 AM   #2
Razvan Socol
Guest
 
Posts: n/a
Re: SQLServer Error: 536, Invalid length parameter passed to the SUBST

JackO wrote:
> I am trying to run an SSIS package from SQL Server 2005 Standard
> Edition with SP2 and I am getting the following error: 'SQLServer
> Error: 536, Invalid length parameter passed to the SUBSTRING
> function. [SQLSTATE 42000]'. I am storing the packages in the SQL
> Server database and I have setup credentials for a user called 'PDAT'
> and have setup a Proxy using the credentials of the user. Any help
> or suggestions would be appreciated.


In your SSIS package there is a query that calls the SUBSTRING function
with a wrong value (probably a negative value). The value probably
comes from the CHARINDEX function, which returns 0 if it doesn't find
the specified string. Change your query to handle this situation (you
can use a combination of NULLIF and ISNULL functions) or check your
input data file for unexpected data.

--
Razvan Socol
SQL Server MVP
 
 

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT. The time now is 10:18 PM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2013, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional