Hello all,
I know how to filter on records based on a datetime field, such as in the following query:
SELECT ORDERS.ORDER_NO, ORDERS.ORDERDATETIME
FROM
ORDERS
WHERE ORDERS.ORDERDATETIME >= {ts '2011-12-31 00:00:00'}
But, i'm unsure of the syntax when filtering records based on a time field. For example, selecting all orders where time of order greater than 9:00 AM.
Here is the following query:
SELECT ORDERS.ORDER_NO, ORDERS.ORDERDATETIME, TIME(ORDERS.ORDERDATETIME) AS GETTIME
FROM
ORDERS
WHERE TIME(ORDERS.ORDERDATETIME) > 9:00 am
Not sure what the correct syntax would be. Any help would be greatly appreciated.
Cheers,
Neill
I know how to filter on records based on a datetime field, such as in the following query:
SELECT ORDERS.ORDER_NO, ORDERS.ORDERDATETIME
FROM
ORDERS
WHERE ORDERS.ORDERDATETIME >= {ts '2011-12-31 00:00:00'}
But, i'm unsure of the syntax when filtering records based on a time field. For example, selecting all orders where time of order greater than 9:00 AM.
Here is the following query:
SELECT ORDERS.ORDER_NO, ORDERS.ORDERDATETIME, TIME(ORDERS.ORDERDATETIME) AS GETTIME
FROM
ORDERS
WHERE TIME(ORDERS.ORDERDATETIME) > 9:00 am
Not sure what the correct syntax would be. Any help would be greatly appreciated.
Cheers,
Neill