PL/SQL (MOSC)

MOSC Banner

Strange SQL behavior in cloned databases

edited Nov 6, 2019 4:04AM in PL/SQL (MOSC) 1 commentAnswered

Bear with me as I'm going to post a lot of info to document the issue but in reality it's a pretty simple sql statement that is demonstrating odd behavior across almost identical databases.

I have query when I run it in my production database has this result:

SQL> select 'GP'

  2  -- into v_person

  3  from dual

  4  where exists

  5  (select tbraccd_pidm

  6  from tbraccd, tzrclas, sgbstdn

  7  where tbraccd_pidm = 1234567 and

  8  tbraccd_pidm = tzrclas_pidm and

  9  tbraccd_pidm = sgbstdn_pidm and

10  tbraccd_detail_code like 'T%' and

11  tbraccd_term_code = decode( substr(tzrclas_term_code, 5, 2), '45', decode(tzrclas_clas_code, 'FR', GZKTERM.F_CALC_TERM(tzrclas_term_code,-1), 'SR', tzrclas_term_code, decode(sgbstdn_majr_code_conc_1, 'NCOP', GZKTERM.F_CALC_TERM(tzrclas_term_code,-1), null, GZKTERM.F_CALC_TERM(tzrclas_term_code,-1), tzrclas_term_code)), tzrclas_term_code) and

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center