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.

SQL Error [1791] [42000]: ORA-01791 with concatenation string

Luis AlvaraezOct 29 2024

I don't understand why these query with column time gives me error. I think concatenation string (||) doesn't like it.

Could you help me please?

SQL Error [1791] [42000]: ORA-01791: not a SELECTed expression
select distinct b.ty||';'||b.mem||';'||a.jjj||';'||a.time||';'||a.dc||';'||a.etim||';'||a.oid||';'||a.app||';'||
case when stat = 345 then 'valid'
    when stat = 5667 then 'INVALID'
    else to_char(stat)
        END ||';'||ext_sec/60||';'||a.gr||';'||a.ta
                   from runinfo_history a INNER JOIN def_job b
                                               on a.ta=b.parent_table
                                               inner join def_tables dt
                                               on a.dc = dt.dc
                                               and a.ta = dt.ta
                                               and a.dc = dt.dc
                                               and dt.id = b.id
                                               and a.jjj=b.job_name
                                               WHERE
                 to_char(time,'YYYYMMDD') = to_char(current_date,'YYYYMMDD')
                 and a.dc in ('SERVER') order by time DESC ;
This post has been answered by Cookiemonster76 on Oct 29 2024
Jump to Answer

Comments

Post Details

Added on Oct 29 2024
7 comments
93 views