finding max, avg, min length of a field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
I have a field xxx in table1. I need to find out what's the longest
length (max(len)) and the shortest length, and the average characters on the
field. Can someone please help me with the query?

Thanks,
 
Jeff said:
I have a field xxx in table1. I need to find out what's the longest
length (max(len)) and the shortest length, and the average characters on the
field. Can someone please help me with the query?


Strange request.

Based on what you've said, aquery for that could be:

SELECT Max(Len(xxx)) As MaxLen,
Min(Len(xxx)) As MinLen,
Avg(Len(xxx)) As AvgLen
FROM table1
 
Perhaps

SELECT Max(Len(SomeField)) as Longest,
Min(Len(SomeField)) as Shortest,
Avg(Len(SomeField)) as AvgLength
FROM YOURTable
 
Back
Top