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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top