i have a matching record in both tables : phone, email and arrivaldate, still the record coming as a result in the below query, if a record is a thre with the three matching values in both tables t1 and t2, i don't want to show that record as a result.
phone=7722036743, emailid: email@example.com, arrivaldate: 10/8/2015
SELECT * FROM LodgingRequest t1 WHERE NOT exists (SELECT * fROM PatientProfile t2 WHERE rtrim(t1.email) = rtrim(t2.LR_Email) and rtrim(t1.Phone) = rtrim(t2.LR_Phone) and CONVERT(varchar(10), t1.Arrivaldate, 101)= CONVERT(varchar(10), t2.LR_Arrivaldate, 101));
Please need a proper way to handle above query.
Thanks a lot for the helpful info.