you might want to try this
SELECT to_char (zdate, 'mm/DD/yyyy hh24:MI') as zdate,
to_char (time, 'mm/DD/yyyy hh24:MI') as zTime,
(datediff(minute ,zdate,time) )* 60 as totalHours
title, id, comments, status, type, user_id
FROM lieu_events
WHERE zdate LIKE '%#UCase(DateFormat(ThisCa
AND status='APPROVED'
Main Topics
Browse All Topics





by: mrichmonPosted on 2004-10-07 at 13:05:11ID: 12253050
<CFQUERY DATASOURCE="lieu" NAME="lookup"> lMonth, "mmm-yy"))#%'
SELECT SUM(Datediff(h, zdate, time)) AS hoursum, user_id
FROM lieu_events
WHERE zdate LIKE '%#UCase(DateFormat(ThisCa
AND status='APPROVED'
GROUP BY user_id
</CFQUERY>
That should do it.
If you still need other columns just add them to both the select and group by....