My current code snippet is given below. I want to use "NOT IN" query instead of left join.
from Complaints C
inner join Employees E on E.ID = C.EmployeeID
left join ComplaintInfractionMapping CIM on CIM.ComplaintID = C.ID
How to use "NOT IN" Query in stored procedure . In below code there is syntax error.
from Complaints C
inner join Employees E on E.ID = C.EmployeeID
NOT IN SELECT InfractionComment,InfractionDate FROM ComplaintInfractionMapping where ComplaintID = C.ID