Oracle PL-SQL cursors - TechRepublic
General discussion
July 4, 2002 at 10:46 PM
volksjager

Oracle PL-SQL cursors

by volksjager . Updated 23 years, 11 months ago

I have created a stored procedure in oracle 8.1.7.2. On the face of it the code is correct, but I get the following error. Is there there is a restriction on joins in a cursor?

ORA-01003 no statement parsed
Cause: A host language program callreferenced a cursor with no associated parsed SQL statement. A SQL call (for example, OSQL3) must be used to pass a SQL statement to Oracle and to associate the statement with an open cursor. A cursor must already have an associated SQL statement ifreferenced in any of the following calls: DESCRIBE, NAME, DEFINE, BIND, EXECUTE, and FETCH.

Action: Do the SQL call, for example, OSQL, to pass the required SQL statement before referencing the cursor.
CURSOR cur_user_bvrole

IS

SELECT bv.ACCOUNT_ROLE

FROM BV_MR_ACCT_ROLE bv, MR_ACCT_PROFILE mr

WHERE

(

(bv.USER_ID = to_number(input_USER_ID))

AND (bv.ACCOUNT_ID = mr.ACCOUNT_ID)

AND (input_ACCOUNT = mr.account_name)

);

This discussion is locked

All Comments