I am trying to create a SQL statement that for every record from main table, it will read the one of the child record if any. If it is found, I want to get the latest record from the child table with some fields.For exmaple, I use this code:select b.priority, b.lognumber, a.assignedtologonid, a.lastupdatedatetime, a.codefrom problem as b left outer join Problemassignment as a on b.lognumber = a.lognumber
I am interseting getting the latest record on a.lastupdatedatetime.