Hi All.I join three tables Customer(Customer_Id,FName, LName); CustomerVisit(CustomerVisit_Id, Customer_Id, Date, SvcNo); VisitProcedure(VisitProcedure_Id, CustomerVisit_Id, Quantity)select distinctcv.CustomerVisit_Id,convert(varchar(10),Date,101) Date,Svc_No,FName + ' ' + LName CustomerName,c.Customer_Id,Doctor_Id,Quantityfrom dbo.Customer cjoin dbo.CustomerVisit cvon c.Customer_id = cv.Customer_Idleft outer join dbo.VisitProcedure vpon cv.CustomerVisit_Id = vp.CustomerVisit_Id
My problem is when same Customer has more then one procedure per visit I have duplication.How to recreate that SELECT statement to exclude duplication?Thanks.