Dec 12, 2006 #1 kvang Programmer Oct 7, 2005 129 US I have an audit log table with a datetime column. I want to count the number of entries each hour. AUDITLOGID F_TIMESTAMP 1 8/2/2006 5:16:47 PM 2 8/2/2006 5:38:30 PM 3 8/2/2006 6:23:30 PM 4 8/2/2006 8:03:30 PM Any help is appreciated.
I have an audit log table with a datetime column. I want to count the number of entries each hour. AUDITLOGID F_TIMESTAMP 1 8/2/2006 5:16:47 PM 2 8/2/2006 5:38:30 PM 3 8/2/2006 6:23:30 PM 4 8/2/2006 8:03:30 PM Any help is appreciated.
Dec 12, 2006 #2 johnherman MIS Oct 10, 2003 2,323 US select trunc(f_timestamp,'HH'), count(auditlogid) from auditlogtable group by trunc(f_timestamp,'HH') or HH24 ------------------------- The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright Upvote 0 Downvote
select trunc(f_timestamp,'HH'), count(auditlogid) from auditlogtable group by trunc(f_timestamp,'HH') or HH24 ------------------------- The trouble with doing something right the first time is that nobody appreciates how difficult it was - Steven Wright