November 6, 2007 at 8:22 am
I've read SQL 2005 now has a max variable size of 8k, but ours is still at 4k. Is there a setting somewhere that can easily be changed or was it an install option?
Thanks, Ed
November 7, 2007 at 2:07 am
Where do you get this information from?
This little test shows that a variable can hold more than 4K
DECLARE @var char(8000)
SET @var = (SELECT REPLICATE('Test',2000))
SELECT @var
Markus
[font="Verdana"]Markus Bohse[/font]
November 7, 2007 at 2:24 am
NVARCHAR is still 4000 bytes due to being double byte character sting (unicode).
N 56°04'39.16"
E 12°55'05.25"
November 7, 2007 at 2:51 am
Peter Larsson (11/7/2007)
NVARCHAR is still 4000 bytes due to being double byte character sting (unicode).
Sorry Peter to correct you but nvarchar too is 8000 bytes, but the length is limited to 4000 because of the double byte character.
[font="Verdana"]Markus Bohse[/font]
November 7, 2007 at 11:38 am
MarkusB (11/7/2007)
Peter Larsson (11/7/2007)
NVARCHAR is still 4000 bytes due to being double byte character sting (unicode).Sorry Peter to correct you but nvarchar too is 8000 bytes, but the length is limited to 4000 because of the double byte character.
Semantics 😀
N 56°04'39.16"
E 12°55'05.25"
November 7, 2007 at 11:38 pm
ed.nettestad (11/6/2007)
I've read SQL 2005 now has a max variable size of 8k, but ours is still at 4k. Is there a setting somewhere that can easily be changed or was it an install option?Thanks, Ed
If you use VARCHAR(MAX), you get 2 gig.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 8, 2007 at 10:32 am
Thanks for the help, Ed
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply