Job -------- Id Description JobStatus ---------- Id JobId StatusTypeId Date
How do I get the current JobStatus for all jobs?
JobStatus
Another (not very efficient, but easy to understand) solution for SQL Server 2000:--
SELECT * FROM job j WHERE j.date = (SELECT MAX(date) FROM job WHERE id = j.id)