459,940 Members | 1,300 Online
Need help? Post your question and get tips & solutions from a community of 459,940 IT Pros & Developers. It's quick & easy.

# Sum up total hours for mutiple day entries

 P: 1 Can't figure out how to sum up a total of hours from same date entries. Query: SELECT work_hrs_for_day.empl_numbr, work_hrs_for_day.user_date, work_hrs_for_day.workday_totl, mech_hrs_for_day.day_totl FROM work_hrs_for_day LEFT JOIN mech_hrs_for_day ON (work_hrs_for_day.user_date = mech_hrs_for_day.job_date) AND (work_hrs_for_day.empl_numbr = mech_hrs_for_day.empl_numbr) WHERE work_hrs_for_day.empl_numbr= 699 AND work_hrs_for_day.user_date >= 01/24/2008 AND work_hrs_for_day.user_date >= 02/28/2008 AND work_hrs_for_day.workday_totl > .5 AND (abs(work_hrs_for_day.workday_totl - mech_hrs_for_day.day_totl) > .5 OR mech_hrs_for_day.day_totl is Null) ORDER BY user_date Result: empl_number user_date workday_totl day_totl 699 1/3/2008 5.03 13.83 699 1/3/2008 8.8 13.83 699 1/4/2008 3.95 11.76 699 1/4/2008 7.81 11.76 699 1/7/2008 8.17 13.67 699 1/7/2008 5.5 13.67 Can't figure out how I can add the date totals so they only show the total of that day! Mar 14 '08 #1