I'd like to ask if you'd take a look at this piece of code I inherited and tell me why Oracle does not like it?
Situation is that I am using Oracle Designer 6i to create forms. One of the modules makes a call to a PL/SQL procedure that has 2 variables passed: insertextent(id,:CGU$USER)
When I try to generate the form I get the PL/SQL ERROR 49: bad bind variable 'CGU$USER'. I tried replacing 'CGU$USER' with 'x', but still got the error. I'm not sure what the CGU$ code represents, just some audit column I suppose (the user in this case). This is the code inside the PL/SQL definition:
BEGIN
INSERT INTO PIG_CELLS(PIG_ID, CELL_ID_NMBR)
SELECT v_id, EXTENT_ID
FROM EXTENT_LIST
WHERE
USER_NAME = :v_user_id;
EXCEPTION
WHEN NO_DATA_FOUND then
NULL;
END;
BEGIN
DELETE FROM EXTENT_LIST
WHERE
USER_NAME = :v_user_id;
COMMIT;
RETURN;
END;
There are only 2 columns in the EXTENT_LIST table (EXTENT_ID, USER_NAME).
Thanks very much.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to ask if you'd take a look at this piece of code I inherited and tell me why Oracle does not like it?
Situation is that I am using Oracle Designer 6i to create forms. One of the modules makes a call to a PL/SQL procedure that has 2 variables passed: insertextent(id,:CGU$USER)
When I try to generate the form I get the PL/SQL ERROR 49: bad bind variable 'CGU$USER'. I tried replacing 'CGU$USER' with 'x', but still got the error. I'm not sure what the CGU$ code represents, just some audit column I suppose (the user in this case). This is the code inside the PL/SQL definition:
BEGIN
INSERT INTO PIG_CELLS(PIG_ID, CELL_ID_NMBR)
SELECT v_id, EXTENT_ID
FROM EXTENT_LIST
WHERE
USER_NAME = :v_user_id;
EXCEPTION
WHEN NO_DATA_FOUND then
NULL;
END;
BEGIN
DELETE FROM EXTENT_LIST
WHERE
USER_NAME = :v_user_id;
COMMIT;
RETURN;
END;
There are only 2 columns in the EXTENT_LIST table (EXTENT_ID, USER_NAME).
Thanks very much.