Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
Could someone tell me why this statementdoes not work" Invalid length parameter passed to the substring function."When I enter the following statement"select substring(suaddress,1,len(suaddress)-1) as add1 from pl_accounts"
isanlu
Starting Member
7 Posts
Posted - 2005-01-19 : 15:03:55
Looks like you may have a row in there that is either Null or blank and therefore you are returning a negative len for that row.Try looking for the row by doing thisSELECT *FROM TABLE_NAMEORDER BY len(suaddress)to see if there are any 0