The solution pointed to by Piet is a good starting point. I'd modify it to do something more along these lines:
SELECT
Catalog.Type,
Catalog.Name,
Catalog.Path,
MAX(ExecutionLog.TimeStart) AS lastUsed
FROM
dbo.Catalog
LEFT JOIN dbo.ExecutionLog
ON Catalog.ItemID = ExecutionLog.ReportID
WHERE
Catalog.Type = 2
GROUP BY
Catalog.Type,
Catalog.Name,
Catalog.Path
The LEFT JOIN ensures that you will get all the reports currently with a NULL in the lastUsed column if there is no longer a row in the Execution Log because the last use has aged out of the execution log.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question