11,580,580 members (72,250 online)
Rate this:
Please Sign up or sign in to vote.
See more:
```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 31-Dec-12 18:40pm
Edited 31-Dec-12 18:44pm
v2
Comments
prashant patil 4987 at 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 at 1-Jan-13 1:19am

What is your question?

## 1 solution

Rate this:
Please Sign up or sign in to vote.

## Solution 1

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...

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

 0 Frankie-C 195 1 OriginalGriff 188 2 Sergey Alexandrovich Kryukov 80 3 Afzaal Ahmad Zeeshan 75 4 Richard Deeming 60
 0 OriginalGriff 1,088 1 Sergey Alexandrovich Kryukov 750 2 Abhinav S 638 3 Suvendu Shekhar Giri 433 4 F-ES Sitecore 420

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 1 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100