How do i select a Distinct value from a select statement with LEFT JOINS? The value I'm after is one of either s_id from trainingTbl or setName from setsTbl.
The full string is provided below.
Dim strQuery As String =
"SELECT *
FROM userAssessmentTbl
LEFT JOIN trainingTbl ON userAssessmentTbl.tt_id = trainingTbl.tt_id
LEFT JOIN setsTbl ON trainingTbl.s_id = setsTbl.s_id
LEFT JOIN outcomesTbl ON userAssessmentTbl.o_id = outcomesTbl.o_id
WHERE UserId = @UserId
ORDER BY t_date DESC "