Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

add a column to query with difference of time between two date columns.

zn553Jun 2 2021

I would like based on this query add a column that will display the time elapsed between the 'eventtime' and the 'time_received:


select a.transaction_id, e.eventcode, e.eventtime, a.time_received
from request_history_tbl a 
   join eventlog_tbl e on a.transaction_id = e.transaction_id
   where e.eventtime >= sysdate - 30
   and e.eventcode = '50'
   order by 3 desc;

the time_received and eventtime are of type date.
how can i add a new column per instance 'elapsed that display the diff in seconds per instance between eventtime and time_received?

This post has been answered by Solomon Yakobson on Jun 2 2021
Jump to Answer

Comments

Post Details

Added on Jun 2 2021
2 comments
834 views