By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,124 Members | 2,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,124 IT Pros & Developers. It's quick & easy.

Show only the Last Step in Process (query)

P: n/a
I need to create a report or query that will show the last step
completed in a process.

Here are the details

Part number serial no
Discription Date
10068206-302 0225 KIT READY CHECK 6/26/2007 6:32:06 PM
10068206-302 0225 KIT PARTS 6/26/2007 6:32:21 PM
10068206-302 0225 KIT Audit 6/26/2007
6:32:34 PM
10068206-302 0225 KIT Audit 6/26/2007
6:35:28 PM
10068206-302 0225 KIT Audit 6/26/2007
6:36:55 PM
10068206-302 0225 FIRST INSPECTION STEP 7/25/2007 8:16:55 PM
10068206-302 0225 FIRST TEST 7/31/2007 11:18:17 PM
10068206-302 0225 SECOND INSPECTION STEP 8/1/2007 2:01:20 AM
10068206-302 0225 FINAL INSPECTION 8/1/2007 2:02:32 AM

I would like the query to only return the last line. This is the last
step in the process. basically i need to show what the process
performed on all of our parts. This seems really really really simple
but i am drawing a blank. thanks for your help

KO

Aug 7 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
something like this (air code):

select p.* from
(
select [Part number], max([Date]) as LastDate
from parts
group by [Part number]
) as A
inner join parts as p on A.[Part number] = p.[Part number]
and A.LastDate = p.[Date]
turtle wrote:
I need to create a report or query that will show the last step
completed in a process.

Here are the details

Part number serial no
Discription Date
10068206-302 0225 KIT READY CHECK 6/26/2007 6:32:06 PM
10068206-302 0225 KIT PARTS 6/26/2007 6:32:21 PM
10068206-302 0225 KIT Audit 6/26/2007
6:32:34 PM
10068206-302 0225 KIT Audit 6/26/2007
6:35:28 PM
10068206-302 0225 KIT Audit 6/26/2007
6:36:55 PM
10068206-302 0225 FIRST INSPECTION STEP 7/25/2007 8:16:55 PM
10068206-302 0225 FIRST TEST 7/31/2007 11:18:17 PM
10068206-302 0225 SECOND INSPECTION STEP 8/1/2007 2:01:20 AM
10068206-302 0225 FINAL INSPECTION 8/1/2007 2:02:32 AM

I would like the query to only return the last line. This is the last
step in the process. basically i need to show what the process
performed on all of our parts. This seems really really really simple
but i am drawing a blank. thanks for your help

KO
Aug 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.