April 16, 2003 at 4:09 pm
Microsoft books online tells that var char length can be upto 8000 characters. Does this mean that if you have defined a field as var char length 600 it will allow 600 characters of data populated in that field in the table. Because its not happening in my case. I have defined field as var char with 600 as length but its storing only 255 characters even though I see on GUI side more than 300+ character string entered. Please help how do I resolve the issue so that I can store upto 1000 characters of data.
Thanks for your help.
April 16, 2003 at 4:12 pm
Cross-post, check out my comment in this thread:
http://www.sqlservercentral.com/forum/link.asp?TOPIC_ID=11294
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
Gregory A. Larsen, MVP
April 16, 2003 at 4:15 pm
Create Table Test(A varchar(2000))
Go
Insert Test
Select Replicate('1234567890',100) -- 100 * 10 = 1000 characters
GO
Select 'Column A contains ',DataLength(A),' characters' From Test
Go
Drop table test
GO
If you are using Query Analyzer, go to
Tools->Options->Results and check Maximum characters per Column, maybe it still 255!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply