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!

q operator caused line break randomly

Cui kuijunJun 18 2025

When use `q'[]'` syntax to output multiple lines, I found the some row will be broken in to two lines, is there any way to avoid that?

below pickture is the code:

this is the output of this string:

      WITH v AS (
      SELECT log_date,
             status,
             owner,
             job_name AS scheduler,
             actual_start_date,
             EXTRACT(DAY FROM -- here row been broken
run_duration)*24*60*60
                      + EXTRACT(HOUR FROM run_duration)*60*60
                      + EXTRACT(MINUTE FROM run_duration)*60
                      + EXTRACT(SECOND FROM -- here row been broken
run_duration) AS duration,
             errors
        FROM dba_scheduler_job_run_details
     WHERE  status = 'SUCCEEDED' AND job_name = 'BITSDBA_MON_PCK_MONWAITERS_19C' AND log_date >= TIMESTAMP
'2025-06-13 00:00:00 +09:00'
      UNION ALL
      SELECT a.log_date,
             decode(b.status, NULL, 'SUCCEEDED', 'FAILED') AS status,
             a.owner,
             a.window_name AS -- here row been broken
scheduler,
             a.actual_start_date,
             EXTRACT(DAY FROM a.actual_duration)*24*60*60
                      + EXTRACT(HOUR FROM a.actual_duration)*60*60
                      + -- here row been broken
EXTRACT(MINUTE FROM a.actual_duration)*60
                      + EXTRACT(SECOND FROM a.actual_duration) AS duration,
             a.additional_info AS errors
        FROM dba_scheduler_window_details 
a
        INNER JOIN
             dba_scheduler_window_log b
          ON a.log_id = b.log_id
     WHERE  b.status IS NULL AND a.window_name = 'BITSDBA_MON_PCK_MONWAITERS_19C' AND a.log_date >=
TIMESTAMP '2025-06-13 00:00:00 +09:00') SELECT * FROM v ORDER BY log_date DESC
This post has been answered by Cookiemonster76 on Jun 20 2025
Jump to Answer
Comments
Post Details
Added on Jun 18 2025
9 comments
262 views