Below query works correctly in Oracle,but it gives error when run in the access as 'Undefined function 'trunc' in expression'.The trunc function in this query displays the date and hour as '12/9/2009 1:00:00 AM'.which function in access supports this type of calculation.
SELECT count(order_id), trunc(ORDER_DATE,'HH'),sum(subtotal)
FROM order_vw
WHERE (ORDER_DATE between to_date('12/9/2009 00:00:01','MM/DD/YYYY HH24:MI:SS')
and to_date('12/9/2009 23:59:59','MM/DD/YYYY HH24:MI:SS'))
group by trunc(ORDER_DATE,'HH')
order by trunc(ORDER_DATE,'HH')