FoFa
Registered User.
- Local time
- Today, 17:14
- Joined
- Jan 29, 2003
- Messages
- 3,672
Way around this?
DECLARE @sVar Char(500)
SET @sVar space(500)
SET @sVar = STUFF(@sVar,250,16,'ABCDEFGHIJKLMNOP')
PRINT @sVar
Shows a bunch a spaces with the ABC... in 250 through 266
INSERT INTO Table (My500Col) values(@sVar)
The data in the My500Col is truncated at 255 (I.E. shows ABCDEF and then is empty)
So what is up with that?
Breaking into two variables (each 250) and doing a:
INSERT INTO Table (My500Col) values(@sVar1 + @sVar2)
Does the same thing.
Also once the actual data is in (two columns of char(250) each) and you try to pull it out as one field:
SELECT My250Col1 + My250Col2
It truncates at the same 255 point.
So what IS up with that?
DECLARE @sVar Char(500)
SET @sVar space(500)
SET @sVar = STUFF(@sVar,250,16,'ABCDEFGHIJKLMNOP')
PRINT @sVar
Shows a bunch a spaces with the ABC... in 250 through 266
INSERT INTO Table (My500Col) values(@sVar)
The data in the My500Col is truncated at 255 (I.E. shows ABCDEF and then is empty)
So what is up with that?
Breaking into two variables (each 250) and doing a:
INSERT INTO Table (My500Col) values(@sVar1 + @sVar2)
Does the same thing.
Also once the actual data is in (two columns of char(250) each) and you try to pull it out as one field:
SELECT My250Col1 + My250Col2
It truncates at the same 255 point.
So what IS up with that?