UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Lastest Job Update Query    
 
   
tylerpestell
post Oct 30 2006, 02:11 AM
Post #1

UtterAccess Enthusiast
Posts: 76



I have tried multiple things but I can't seem to figure this out ... I have 2 tables as follows

tblJobs
pkJobID
fkEmployeeID
JobControlNumber
Discrepency

tblJobUpdates
pkJobUpdateID
fkJobID
fkEmployeeID
Description
dtTime

I want the query to show all the Jobs and just the latest Update to the job ... I can't figure it out. Any help would be greatly appreciated.
Go to the top of the page
 
+
Rainlover
post Oct 30 2006, 03:56 AM
Post #2

Utterly Banned
Posts: 6,006
From: Brisbane Qld Australia



SELECT TblJbUpdates.FKJobID, Last(TblJbUpdates.pkJobUpdateID) AS LastOfpkJobUpdateID
FROM TblJbUpdates
GROUP BY TblJbUpdates.FKJobID;

If you want to do this in the query grid and include tblJobs then please post the two mentionted tables in a cut down DB.

Hope this helps.
Go to the top of the page
 
+
tylerpestell
post Oct 31 2006, 01:10 AM
Post #3

UtterAccess Enthusiast
Posts: 76



Ok I used what you said and saved it as qryLatestUpdates then I created another Query with that in it and tblJobs and tblJobUpdates so I could retrieve the information about the latest update. This works but it is the correct way of doing it?
Go to the top of the page
 
+
Rainlover
post Oct 31 2006, 01:25 AM
Post #4

Utterly Banned
Posts: 6,006
From: Brisbane Qld Australia



I am not 100% sure. Can you post a copy as I mentioned in the previous post.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th June 2013 - 10:20 PM