Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Trouble With Advanced Sorting in MS Access

Author  Topic 

esnapper
Starting Member

1 Post

Posted - 2011-03-28 : 16:06:53
Hi,

I am using MS Access 2007 to manipulate Event Query data. I have just started learning to use SQL to manipulate this data today, and have ran into a snag...

I am trying to create a condensed list that will tell me the Serial Number of a "failed" item, along with the FIRST time that the item was reported as a failure.

Example:
I want to sort a table like this...

S/N ........ TimeToFail (hours)
Fake1 ...... 12
Fake1 ...... 25
Fake2 ...... 15
Fake3 ...... 30
Fake3 ...... 35
Fake3 ...... 40

To filter out the repeated S/N's, giving me only the FIRST amount of time taken to see a "failure"...

S/N ........ TimeToFail (hours)
Fake1 ...... 12
Fake2 ...... 15
Fake3 ...... 30


Any help would be immensely appreciated.

edit: moved to MS Access forum

SMerrill
Posting Yak Master

206 Posts

Posted - 2011-04-29 : 19:19:27
[code]SELECT Table.[S/N], First(Table.TimeToFail) AS FirstOfTimeToFail
FROM [Table]
GROUP BY Table.[S/N];
[/code]

~ Shaun Merrill
Seattle area
Go to Top of Page
   

- Advertisement -