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!

getting an SQLCODE of 1403 when i know i shouldn't

441278Apr 19 2006 — edited Feb 7 2008
ok, i have the following sql stmt in my COBOL program:
EXEC SQL
DECLARE DENT_CSR CURSOR FOR
SELECT TO_CHAR(D_AFFCNTLN_EFF, 'YYYYMMDD'),
TO_CHAR(D_AFFCNTLN_TERM,'YYYYMMDD')
FROM SQLIS.AFFCNLNK@SQLP
WHERE I_AFF_LIC = :WXIAFFLICD
AND I_CNTRCT_TYPE = 'DENT'
AND TO_CHAR(D_AFFCNTLN_EFF, 'YYYYMMDD') <=
TO_CHAR(SYSDATE, 'YYYYMMDD')
AND TO_CHAR(D_AFFCNTLN_TERM, 'YYYYMMDD') >=
TO_CHAR(SYSDATE, 'YYYYMMDD')
END-EXEC.

the contents of the variable :WXIAFFLICD is passed in from another SQL stmnt;
when i do the FETCH to execute this cursor, i get a SQLCODE of 1403 (not found), when i should be finding something;

i have taken this statement and run it thru SQL (outside of the COBOL program) and it retrieves at least one row, which is what i expect, so why do i get the ORA-1403 msg when i run this SQL stmnt inside my COBOL program????

Your help would be greatly appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 6 2008
Added on Apr 19 2006
13 comments
10,270 views