Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to determine string length

Status
Not open for further replies.

ChopinFan

Technical User
Oct 4, 2004
149
US
How do I query a text field to determine the maximum number of characters entered into it among all the records? Does SQL have an equivalent for a VBA Len() function?

Thanks!
 
Try

Code:
select len([column]) from table

Hope it helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
or

Code:
select max(len([column])) from table

to find the max.

Ignorance of certain subjects is a great part of wisdom
 
DataLength

Select Max(DataLength([!]FieldName[/!]))
From Table

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 

Excellent. "Datalength" does the trick. Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top