Solved

Need help with syntax error on SUBSTRING

Posted on 2008-10-17
5
478 Views
Last Modified: 2012-05-05
I'm getting a ton of error message when i run this query.  Can someone help take a look here.  Thank you.

Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(2 row(s) affected)

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(4 row(s) affected)

(4 row(s) affected)

(4 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(3 row(s) affected)

(3 row(s) affected)

(3 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(2 row(s) affected)

(2 row(s) affected)

(2 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)

(1 row(s) affected)

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.

(1 row(s) affected)
Msg 536, Level 16, State 5, Line 124
Invalid length parameter passed to the SUBSTRING function.
-- Some other code here before the problem area

DECLARE @interestChildId bigint, @parentId bigint, @srchId bigint, @curApplId bigint

DECLARE @interestName VARCHAR(100)

DECLARE @name as VARCHAR(1000)

SET @Name = ''
 

Declare curApplicationRow Cursor FOR

SELECT RchChildId, Id from CtsiApplication
 

Open curApplicationRow

FETCH NEXT FROM curApplicationRow

INTO @interestChildId, @curApplId
 

WHILE @@FETCH_STATUS =0  --GO THROUGH EACH RECORD

BEGIN

	--The following select will get us the 1st child id for Rsch interest

    SELECT @Name = dbo.ResearchInterests.Name + ', ' + @Name

    from dbo.ResearchInterests

    WHERE dbo.ResearchInterests.Id = @interestChildId
 

	SELECT @srchId = dbo.ResearchInterests.ParentResearchInterest_id

	from dbo.ResearchInterests

	WHERE dbo.ResearchInterests.Id = @interestChildId
 
 

--INSERT INTO [CtsiMembershipProduction].[dbo].[Interest]([Name])

--     VALUES

--           (interestName)
 

	WHILE(@srchId <> NULL)--USE THE PARENTID TO TRAVERSE TO ITS PARENT NODE UNTIL REACHES ROOT NODE

	BEGIN
 

		SELECT @Name = dbo.ResearchInterests.Name + ', ' + @Name

		from dbo.ResearchInterests

		WHERE dbo.ResearchInterests.Id = @interestChildId
 

		SELECT @srchId = dbo.ResearchInterests.ParentResearchInterest_id

		from dbo.ResearchInterests

		WHERE dbo.ResearchInterests.Id = @interestChildId
 

	END--We're done retrieving all the Research interest
 

	--Now, write the top 4 found Interest to the table

	DECLARE @FirstName as varchar(100), @counter int

	SET @counter = 0

	WHILE((len(@name) > 0) and (@counter <4))--Get the top 4 

	BEGIN

		if (CHARINDEX(',',@Name) > 0)

		BEGIN

			SET @FirstName = LEFT(@Name,CHARINDEX(',',@Name))

			SET @Name = SUBSTRING(@Name,CHARINDEX(',',@Name) + 2, LEN(@Name) - CHARINDEX(',',@Name) -2)   -- THERE is maybe some ajustement to do here with the +2 and minus 2 to remove the comma and the blank space, I didn't try this code

		END

		ELSE

		BEGIN

		   SET @FirstName = @Name

		   SET @Name = ''

	   END

		  --- @FirstName containing the first name of @Name and @Name now have left the first name until it is empty

		if(@counter = 0)

			UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

			   SET [Research Interest 1] = @Name

			 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId

		else if(@counter = 1)

			UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

			   SET [Research Interest 2] = @Name

			 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId	

		else if(@counter = 2)

			UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

			   SET [Research Interest 3] = @Name

			 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId

		else if(@counter = 3)

			UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

			   SET [Research Interest 4] = @Name

			 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId
 

		Set @counter = @counter+1

	END 
 
 
 

	FETCH NEXT FROM curApplicationRow

	INTO @interestChildId, @curApplId

END
 

--Remove the unwanted child id columns

ALTER TABLE CtsiApplication DROP RchChildId

--DROP TABLE [dbo].[Interest]

CLOSE curApplicationRow

DEALLOCATE curApplicationRow

Open in new window

0
Comment
Question by:lapucca
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:brad2575
ID: 22740442
If you are just trying to get the last name this may be easier since you already have the first name:

SET @FirstName = LEFT(@Name,CHARINDEX(',',@Name))
SET @Name = Replace(@Name, @FirstName + ',', '')

This will just remove the first name (and the comma) from the @name field to get the last name.





0
 
LVL 6

Expert Comment

by:openshac
ID: 22740462
The following line fails when @Name does not contain ','
SET @Name = SUBSTRING(@Name,CHARINDEX(',',@Name) + 2, LEN(@Name) - CHARINDEX(',',@Name) -2)   -- THERE is maybe some ajustement to do here with the +2 and minus 2 to remove the comma and the blank space, I didn't try this code

		

Open in new window

0
 
LVL 16

Accepted Solution

by:
brad2575 earned 500 total points
ID: 22740487
Also if the field is null when using charindex it returns NULL NOT a number so you can do this on your if check above:

if (CHARINDEX(',',@Name) > 0) AND CHARINDEX(',',@Name) IS NOT NULL
0
 

Author Comment

by:lapucca
ID: 22745249
I'm trying to get each token stored in @name that is separated by a comma ','.  This seems to to causing lot of error.  What's the best way to do this?  Thank you.
0
 

Author Comment

by:lapucca
ID: 22745421
Hi I added the code check that Brad suggested but I'm still getting SUBSTRING erros.  Can't tell if the number is cut down or not.  I'm putting the error in the code snippet since there's quite a bit of it.
	if (CHARINDEX(',',@Name) > 0) AND CHARINDEX(',',@Name) IS NOT NULL

	BEGIN

		--Now, write the top 4 found Interest to the table

		DECLARE @FirstName as varchar(100), @counter int

		SET @counter = 0

		WHILE((len(@name) > 0) and (@counter <4))--Get the top 4 

		BEGIN

			if (CHARINDEX(',',@Name) > 0)

			BEGIN

				SET @FirstName = LEFT(@Name,CHARINDEX(',',@Name))

				SET @Name = SUBSTRING(@Name,CHARINDEX(',',@Name) + 2, LEN(@Name) - CHARINDEX(',',@Name) -2)   -- THERE is maybe some ajustement to do here with the +2 and minus 2 to remove the comma and the blank space, I didn't try this code

			END

			ELSE

			BEGIN

			   SET @FirstName = @Name

			   SET @Name = ''

		   END

			  --- @FirstName containing the first name of @Name and @Name now have left the first name until it is empty

			if(@counter = 0)

				UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

				   SET [Research Interest 1] = @Name

				 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId

			else if(@counter = 1)

				UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

				   SET [Research Interest 2] = @Name

				 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId	

			else if(@counter = 2)

				UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

				   SET [Research Interest 3] = @Name

				 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId

			else if(@counter = 3)

				UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

				   SET [Research Interest 4] = @Name

				 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId
 

			Set @counter = @counter+1

		END 

	END--end if more than 1 names collected

	ELSE if (CHARINDEX(',',@Name) > 0)

		UPDATE [CtsiMembershipProduction].[dbo].[CtsiApplication]

		   SET [Research Interest 1] = @Name

		 WHERE [CtsiMembershipProduction].[dbo].[CtsiApplication].Id = @curApplId
 
 
 

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(3 row(s) affected)
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(3 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(1 row(s) affected)
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(1 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(2 row(s) affected)
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(2 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)
 

(4 row(s) affected)
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 536, Level 16, State 5, Line 126

Invalid length parameter passed to the SUBSTRING function.
 

(4 row(s) affected)

Msg 3728, Level 16, State 1, Line 166

'RchChildId' is not a constraint.

Msg 3727, Level 16, State 0, Line 166

Could not drop constraint. See previous errors.

Open in new window

0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 18 99
Access Date Query 28 44
SQl Server 2008 R2 - Case When Null still equals NULL 10 27
Help Extract Specific in SQL 8 24
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
Confronted with some SQL you don't know can be a daunting task. It can be even more daunting if that SQL carries some of the old secret codes used in the Ye Olde query syntax, such as: (+)     as used in Oracle;     *=     =*    as used in Sybase …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now