Home Forums SQL Server 2005 SQL Server 2005 General Discussion Get longest length of data in a column RE: Get longest length of data in a column
DaveItz
SSCrazy
Points: 2146
More actions
October 30, 2007 at 9:07 pm
#746907
I'm a little rusty but how about something like this?
select top 1 with ties
LogsID, len(Location), Location
from [LOGS]
order by len(Location) desc