Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> need to use variable in FROM clause
I want to be able to pass a table name to a procedure and have it execute a generic select statement. I have had problems doing this (PLS-00201) and have a vague notion that I will need to user DBMS_SQL to do it. PLease help - all examples I have been able to find don't show how to use a variable in a FROM clause. My code is below. I am using Oracle 8.1.5 and PL/SQL 8.1.5 on an NT box.
v_requestnr IN NUMBER, c_event_detail IN OUT audit_cur_typ) IS
BEGIN OPEN c_event_detail FOR
SELECT * FROM V_TABLE WHERE requestnr = V_REQUESTNR;
END;
Thanks,
sonya
please respond email as well, if possible
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Aug 29 2000 - 12:21:08 CDT