Hello all. I have the following query which is working good, although I need to somehow DISTINCT my results. I have tried various things, but keep getting an error.SELECT WorkOrder.WoNum, WorkOrder.TargetDate, WorkOrder.TargetEndDate, WorkOrder.Status, WOLabour.Employee, WoLabour.TransDateFROM WorkOrder INNER JOIN WOLabour ON WorkOrder.WoNum = WOLabour.WoNumWHERE Workorder.TargetDate IS NOT NULL AND Workorder.TargetEndDate IS NOT NULL AND (Workorder.Status = 'wtappr' OR Workorder.Status = 'appr') AND WOLabour.Employee = 'ebystro' AND WoLabour.TransDate BETWEEN Workorder.TargetDate AND Workorder.TargetEndDateGroup By WorkOrder.WoNum, WorkOrder.TargetDate, WorkOrder.TargetEndDate, WorkOrder.Status, WOLabour.Employee, WoLabour.TransDate
I tried adding the following in front of the query, but I keep getting the error "Line 10: Incorrect syntax near ')'."SELECT DISTINCT WoNumFROM WorkOrder WHERE (....)
Any suggestions would be greatly appreciated.Thanks,Parallon