473,396 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Show only the Last Step in Process (query)

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
1 1962
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim Williams | last post by:
I'm trying to write a simple python program to access a MySQL database. I'm having a problem with using MySQLdb to get the results of a SQL command in a cursor. Sometimes the cursor.execute works,...
4
by: Brian | last post by:
Hi there I'm not so hot on JavaScript so not sure if this can be done. I have a PHP page that runs a MySQl query, while these queries are running I would like to show a message saying...
3
by: AndyBell | last post by:
Hi all! I have an Access 2000 database for the Habiat for Humanity where I work. This is the second database I have written and it gets a bit more complex each time... I have learned much and...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
5
by: imissphp | last post by:
I am using Visual Studio 2005 .NET 2.0. and C#. Has anybody transformed xml using xsl and shown the results as a web page? It should be a simple task.... but I can't find a way through the maze...
6
by: Christo | last post by:
I have this script for showing news on a page, but i want it to only show the last 10 records, as in the 10 records that were added to the database last. the script shows the entries in descending...
7
by: Dom | last post by:
On my main form, I click a button to bring up a second form. When the second form comes up, I want to do the following: 1. change this.Cursor to Cursors.Wait 2. Execute the EnumerateServers...
4
by: kdubble | last post by:
Hi I am trying to get the results of a query to show only unique student records (not duplicates). Is there a simple way to make the criteria field do this? I am not too familiar with SQL. ...
0
by: turtle | last post by:
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 ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.