From: QB on
I know this may sound a little paculiar, but I need some help to write a
query that will list the record that has the longest entry (textual length -
Num chars) in a field.

I have a table - tbl_contacts
with 3 fields of interest - first_name, last_name, email

I need to extract the first_name and last_name for the record with the
longest email. How can I do this?

Thank you.
From: KARL DEWEY on
Try this --
SELECT TOP 1 first_name, last_name, email
FROM tbl_contacts
GROUP BY first_name, last_name, email
ORDER BY Len([email]) DESC;

--
Build a little, test a little.


"QB" wrote:

> I know this may sound a little paculiar, but I need some help to write a
> query that will list the record that has the longest entry (textual length -
> Num chars) in a field.
>
> I have a table - tbl_contacts
> with 3 fields of interest - first_name, last_name, email
>
> I need to extract the first_name and last_name for the record with the
> longest email. How can I do this?
>
> Thank you.