Hi All,
I have ODI procedure for pulling out error message based on a SQL statement.
If I run the same procedure in oracle database, it works fine. But when I put the same procedure in ODI procedure, it fails with the following error -
900 : 42000 : java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:462)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:397)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:689)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:481)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:205)
ODI Procedure Details
+++++++++++++++++
DECLARE
STRING1 VARCHAR2(4000);
STRING2 VARCHAR2(4000);
BEGIN
select DISTINCT
DBMS_LOB.SUBSTR (x.error_message, 4000, 1) ,
DBMS_LOB.SUBSTR (x.error_message, 4000, 4001) INTO STRING1, STRING2 from snp_step_log x
where sess_no=351149005 and error_message IS NOT NULL;
END;
Any pointers will be appreciated!
Thanks!