We need to get the HOUR out of a DATETIME column (expecting values from 0 to 23 to be returned).
Is there an Oracle equivalent of the SQL Server DATEPART function?
An alternative is the EXTRACT function which is an ANSI standard and also works on other DBMS, but it also requires the use of current_timestamp (also ANSI) instead of sysdate
SELECT extract(hour from current_timestamp)
FROM dual