如何从带有 LEFT JOINS 的选择语句中选择不同的值?我追求的值是来自 trainingTbl 的 s_id 或来自 setsTbl 的 setName 之一。
下面提供了完整的字符串。
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 "