Here I have an SQL statement which is retrieving all of the right stuff, but I need it to be DISTINCT.
So, for WEEK_NUMBER its returning week_number = 1,1,1,1,1,1 etc
I want it to condense into 1. It is a 3 table query and I’m not sure how I could include the SELECT DISTINCT feature or an alternative, any ideas??
SELECT WEEKLY_TIMECARD.*,DAILY_CALCULATIONS.*,EMPLOYEE_PROFILES.EMPLOYEE_NUMBER
FROM WEEKLY_TIMECARD, DAILY_CALCULATIONS, EMPLOYEE_PROFILES
WHERE EMPLOYEE_PROFILES.EMPLOYEE_NUMBER = WEEKLY_TIMECARD.EMPLOYEE_NUMBER
AND EMPLOYEE_PROFILES.EMPLOYEE_NUMBER = DAILY_CALCULATIONS.EMPLOYEE_NUMBER
AND WEEKLY_TIMECARD.WEEK_NUMBER = DAILY_CALCULATIONS.WEEK_NUMBER
Try this: