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!

Adding the database name within a resultset

jrmtlJun 27 2018 — edited Jun 27 2018

Hello all,   ( v12.1)

Just trying to build some queries and would like to add the database name ( from v$database) for each row displayed.

column StartTime format a15

column EndTime format a15

select to_char(start_time,'DD-MON HH24:MI') StartTime,

   to_char(end_time,'DD-MON HH24:MI') EndTime,

   (end_time-start_time)*1440 Mins,

   input_type, status

   from v$rman_backup_job_details

  where start_time > sysdate - 1

  and input_type='DB FULL'

  order by start_time;

26-JUN 17:00           26-JUN 17:05            5.63333333            DB FULL                  COMPLETED

like this

MY DATABASE       26-JUN 17:00           26-JUN 17:05            5.63333333            DB FULL                  COMPLETED

Thanks

This post has been answered by Hans Steijntjes on Jun 27 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 25 2018
Added on Jun 27 2018
7 comments
331 views