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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

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

Processing

Post Details

Added on Jun 2 2021
2 comments
813 views