SQL help for a novice!

S

SokkiHong

Here is the SQL code I used for a query to get the latest
status for the respective ID's.

SELECT T.*
FROM [Issues SubTable] AS T
WHERE (((T.Date)=(SELECT Max(X.Date) FROM [Issues
SubTable] AS X WHERE T.ID =X.ID)));

Issues Master Table has fields such as ID, Owner,
Description, Resolution & etc..

Issues SubTable has fields such as entered dates and the
status regarding that issues. So multiple entries of
status can occur under one ID.

SubTable is set as a Child, and the Master as a Parent.

This query is pulling from the master table which has all
100 ID's. However, within the Master Table, if a
particular ID does not contain any date & status entry for
the respective ID it will simply not output anything. I
want it to show all of the ID's regardless of whether they
have status associated with it or not, so that the end
result will show all of the 100 ID's and the latest status
updates for the ones that have the status and blanks for
those that don't. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top