Discussion Locked

Oracle PL-SQL cursors

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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)

);

3 replies

by thorarinn_andresson

this looks ok, except that there are too many right parentheses. You should really show more of your code so one coulde look at it seriously.

Regards,
Thorarinn Andresson

This discussion is closed to new replies.