troubleshooting Question

SQL query problem - getting latest results per asset

Avatar of Talon69
Talon69Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL ServerDB Reporting ToolsSQL
6 Comments2 Solutions851 ViewsLast Modified:
Running an SQL Asset Tracking database. We have a table with all of our assets listed and a table that contains the Portable appliance data. They are linked via a third table that contains details of each task.

What I want to generate is a report that shows the latest test data for each asset.

For example, the 3 tables are called Asset, PAT and PPM. One asset can have many PAT records linked via a foreign key in the PAT table to the primary key of the PPM table. The PPM table has a foreign key to the primary key of the Asset table.
I would like to select the asset ID from the asset table and the date last tested from the PAT table.

Could some SQL guru please offer some guidance???

Many thanks in advance!


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros