I wanted a quick way to query a logging table for today’s records. I figured there had to be some way to put a variable “today” into the query rather than put in the numbers for the current date. Voila — a query that retrieves records where the timestamp is greater than or equal to today:
select * from ossa_central_logging where action_ts >= cast(trunc(current_timestamp) as timestamp) order by action_ts desc;