SELECT
subj.SubjectID AS [ID],
subj.SubjectDescription AS [Subject],
enrol.StuSubjEnrolmentID AS [IsEnrol]
FROM [PATHWAYS].[Subjects] AS [subj]
LEFT JOIN
[STUDENT].[StuSubjEnrolment] AS [enrol]
ON subj.SubjectID = enrol.SubjectID
LEFT JOIN
[STUDENT].[Student] AS [stu]
ON enrol.StuID = stu.StuID
AND stu.StuID = @stuID
Hi guys, can anyone please guide me on this? Thank you in advance. I'm really clueless on this.
How can I write this statement in a way that....
When IsEnrol is not null, it returns 0. Else returns 1? I want that particular column to show only 1 or 0.