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!

Help Identify Rows that Raise ErrorORA-01427: single-row subquery returns more than one row

ALEXCOLMay 1 2022

Good Morning, I need your help Please, Im not a DBA, just starting to learn, in a Production System a sacript fails raising this Error:
ORA-20302: ORA-01427: single-row subquery returns more than one row
ORA-02063: preceding line from DB_XYZ
ORA-06512: at "SCLCOL.PREP_TOPINCI_AUTOGESTION", line 435
Bcz I can not rewrite o modify the Package i need to identify the problematic Rows, so I can escalate to another area to regulate the data.
I tried to find out the code for the PROC PAC_MAN_REPORTES.PR_UPDATE_LOG_REPORTE but i cant find it, dont knos if has sth to do with permissions:
SQL> SELECT TEXT from user_source
2 where NAME like '%PR_UPDATE_LOG_REPORTE%'
3 ORDER BY LINE;

WHEN OTHERS THEN
PAC_MAN_REPORTES.PR_UPDATE_LOG_REPORTE (V_NUM_PROCES,'TER',V_DESC_PASO || ' - ' || SQLERRM,'S');
UTL_FILE.FCLOSE (V_APUNTADOR_ARCHIVO);
UTL_FILE.PUT_LINE (V_APUNTADOR_ARCHIVO_LOG, 'ESTADO = NO EXITOSO - ' || V_DESC_PASO || ' - ' || SQLERRM, TRUE);
UTL_FILE.PUT_LINE (V_APUNTADOR_ARCHIVO_LOG, '=============================================================================', TRUE);
UTL_FILE.FCLOSE (V_APUNTADOR_ARCHIVO_LOG);
RAISE_APPLICATION_ERROR (-20302, SQLERRM);
END PREP_TOPINCI_AUTOGESTION;

no rows selected
I dont know if Oracle has a tool or how can i trace and grab the problematic rows:
I add the code
cod_package.txt (26.74 KB)
I appreciate your help in advanced

Comments
Post Details
Added on May 1 2022
9 comments
1,454 views