Comparing values in same field to return only the first unique val

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

Guest

Not sure how I would need to create this and haven't come across the answer
in my searches or help in access. I would like to thank anyone who can
assist me on this one, my brain has just about given up on this!

What I need to do is take the first value found in the field (say ticket
number) and compare the next value to make sure that it is a different
number. If it is the same number I want to make it not display any of the
next values until it finds something different.


Example:

TicketNo Time
2 8:00am
2 8:30am
2 4:00pm
3 11:00am
4 4:30pm
4 5:00pm
5 10:30am

and I need the query to return

2 8:00am
3 11:00am
4 4:30pm
5 10:30am

Hope you guys can help me out on this one!
 
Hi,




SELECT TicketNo, MIN(time)
FROM myTable
GROUP BY TicketNo





Hoping it may help,
Vanderghast, Access MVP
 
Back
Top