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.
| Author |
Topic |
|
OldMySQLUser
Constraint Violating Yak Guru
301 Posts |
Posted - 2009-02-23 : 06:41:20
|
| How can I find length of the longest text entry for a given column please? |
|
|
karthik_padbanaban
Constraint Violating Yak Guru
263 Posts |
Posted - 2009-02-23 : 06:50:19
|
| select max(len(column1)) from table1Karthik |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-23 : 07:02:03
|
| [code]SELECT MAX(DATALENGTH(COL)) FROM TABLE[/code] |
 |
|
|
sodeep
Master Smack Fu Yak Hacker
7174 Posts |
Posted - 2009-02-23 : 07:13:15
|
| I guess LEN won't work for text column. |
 |
|
|
karthik_padbanaban
Constraint Violating Yak Guru
263 Posts |
Posted - 2009-02-23 : 07:24:42
|
quote: Originally posted by sodeep I guess LEN won't work for text column.
Yes you are correct.SELECT MAX(DATALENGTH(COLUMN1)) FROM TABLE1 Karthik |
 |
|
|
OldMySQLUser
Constraint Violating Yak Guru
301 Posts |
Posted - 2009-02-24 : 02:05:34
|
| Many thanks guys. |
 |
|
|
|
|
|