December 5, 2002 at 5:59 pm
Hi,
I have a column as varchar (4000). I'd like to know how long the actual longest value is. I've seen it somewhere, sysindexes table or schema.info table, but can't recall.
Thx.
December 5, 2002 at 6:40 pm
December 5, 2002 at 7:53 pm
information_schema will show you the defined length but since you already know that, use steve's answer to find the actual value length stored therein.
December 9, 2002 at 6:54 am
FYI if you use text or ntext you have to use DATALENGTH (divide by 2 for ntext)
Simon Sabin
Co-author of SQL Server 2000 XML Distilled
http://www.amazon.co.uk/exec/obidos/ASIN/1904347088
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply