The outer join query below produces duplicate records. This is the case because I do not know how to apply Case_Id criteria to show the result for case 1 not for both case 1 and case 2. Note that Case_Id is not included in the Where clause yet.
From tReasonWhyNonKFH t Right Join tDefinition d
On t.ReasonWhyNonKfhDef_Id = d.definitionID
Where t.category = "WhyNonKFH" And d.exclude=0;
Please see the attached images for table tDefinition and tReasonWhyNonKFH along with the query output showing duplicate 676.
Question: How can I include Case_Id = 1 in the Where clause in order for the output to display only17 records from tDefinition without duplicating record 676 (we have 18 now because 676 exist in which exist in tReasonWhyNonKFH for both case 1 and case 2).