Wrong Behavior With Select From External Table
(Doc ID 452014.1)
Last updated on SEPTEMBER 20, 2019
Applies to:Oracle Database - Enterprise Edition - Version 220.127.116.11 to 10.2.0.1 [Release 9.2 to 10.2]
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
The following statement:
to_date (to_char (SYSDATE - 1, 'DD-MON-YYYY'), 'DD-MON-YYYY'),
FROM <table name> P
WHERE EXISTS (SELECT '*'
FROM <external table name> LP
WHERE LP.EMP_NUM = P.EMP_NUM AND
(NVL (LP.PHONE_NUM, '0000000000') != NVL (P.PHONE_NUM, '0000000000') OR
NVL (LP.MAIL_STOP, 'X') != NVL (P.MAIL_STOP, 'X') OR
NVL (LP.ABBREV_FULL_NAME, 'X') != NVL (P.ABBREV_FULL_NAME, 'X') OR
INSTR (NVL (P.BLDG_NUM, 'X'), NVL (LP.BLDG_NUM, 'X')) = 0 OR
NVL (LP.ROOM_NUM, 'X') != NVL (P.ROOM_NUM, 'X') OR
NVL (LP.ORG_CODE, 'X') != NVL (P.ORG_CODE, 'X') OR
(P.EMP_CLASS != 'CS' AND NVL (LP.ORG_NAME, 'X') != NVL (P.AFFILIATION_NAME, 'X')) OR
NVL (LP.EMP_TYPE, '0') != NVL (P.EMP_TYPE, '0') OR
replace (replace (replace (NVL (LP.CONTRACT_NUM, 'X'), ' ', ' '), ' ', ' '), ' ', ' ') != NVL (P.CONTRACT_NUM, 'X') OR
NVL (LP.EMAIL, 'X') != NVL (P.EMAIL, 'X')));
where <external table name> is an external table, apparently works but a log and a bad files are written. The error in the log file is ORA-1401 in 18.104.22.168 or ORA-12899 in 10.2.0.3.
If run in serial mode, the bad file contains a record that is made up of the beginning of a partial record of row N (where N is not equal to 1).
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document