I am trying to retrieve data from a column with integer values by getting the difference between the current_timestamp and the values in the column. This works in DB2 by simply stating the value as hour
TRANS_DATETIME > (CURRENT_TIMESTAMP - my_column_alias HOURS).
However using the same line in PostgreSQL returns the error below. Any ideas on how to modify query for PostgreSQL?
SQL Error : ERROR: operator does not exist: timestamp with time zone - integer¶
Hint: No operator matches the given name and argument types. You might need to add explicit type casts.¶