Sunday, 13 August 2017

ORA-01003: no statement parsed ~ foundjava

Not Java-related but since I started doing a bit of PL/SQL lately and I ran into this problem, I will post this. This error, in my case, was caused by having an Oracle keyword defined as a column name. For example the following
1
2
3
4
5
6
OPEN v_customer_recs FOR
         SELECT sc.EVENT_ID,
                sc.OPEN_DATE,
                ND.DESCRIPTION AS COMMENT,  -- This will cause the error
                SC.BC_DATE
           FROM CUSTOMERS sc, NEW_DESCRIPTION ND
will result in a ORA-01003: no statement parsed. The problem is that the COMMENT keyword is used as a column name. If you change this then the error will go away.

No comments:

Post a Comment