Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
DECLARE @FileBody1         VARCHAR(max)
            ,@FileBody2         VARCHAR(max)
            ,@FileBody3         VARCHAR(max)
            ,@StartingIndex     INT
            ,@FileLength        INT


    SET @StartingIndex = 1
    SELECT  @FileLength = DATALENGTH(DC.FileBody) FROM Configuration DC WHERE DC.ID = 1
    SELECT @FileBody1 = SUBSTRING(DC.FileBody,@StartingIndex,8000)FROM Configuration DC WHERE DC.ID = 1
    SET @StartingIndex = @StartingIndex + 8000
    SELECT @FileBody2 = SUBSTRING(DC.FileBody,@StartingIndex,8000) FROM Configuration DC WHERE DC.ID = 1
    SET @StartingIndex = @StartingIndex + 8000
    SELECT @FileBody3 = SUBSTRING(DC.FileBody,@StartingIndex,8000) FROM Configuration DC WHERE DC.ID = 1

select @FileBody1+''+@FileBody2+''+@FileBody3
Posted
Updated 31-Dec-12 18:44pm
v2
Comments
prashant patil 4987 1-Jan-13 0:56am    
Hey Jayesh..
First of all you have to put your question in proper way..
above question is not clear to any one. explain your question in detail.
Abhinav S 1-Jan-13 1:19am    
What is your question?

1 solution

You can't in practice do that, or at least you shouldn't.
Think about it: If you have two strings which can be the maximum length for a string, how long a string can the result be if you concatenate them? Answer: twice the maximum length of a string...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900