Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Max datalength

Author  Topic 

tgreen
Starting Member

3 Posts

Posted - 2002-11-04 : 07:28:06
How can I query a single column in a table and get returned a count of the characters in the longest value ?

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-11-04 : 08:03:49
select max(datalength(column)) from table

Jay White
{0}
Go to Top of Page

dsdeming

479 Posts

Posted - 2002-11-04 : 08:05:11
select max( datalength( columnname )) from tablename

HTH

Go to Top of Page

tgreen
Starting Member

3 Posts

Posted - 2002-11-04 : 08:19:44
Thank you very much. Worked perfect.



Go to Top of Page
   

- Advertisement -