Query to return First occurrence.

R

Rog

Hello
How would I create a query to return only the first
occurrence of a field. In my case I have a field for a
username. I only want the query to return the username one
time instead of listing every instance of it. thanks in
advance.
 
S

Sandy Eastman

select top 1 username, whatever, whatever2 from UsernameTable;
or
select distinct username from UsernameTable;

Regards, Sandy
 
C

Cameron Sutherland

Either turn on Totals and make your field 'Group By' or
select 'Top Values' and input 1.
-Cameron Sutherland
 
Top