Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> dbms_sql advice
I understand that dbms_sql will allow me to use dynamic queries with a
select statement such as
stmt_str := 'SELECT ename, sal
FROM emp WHERE job = :jobname';
I've been trying to do a similar query, but with variables in the SELECT clause, as well as in the FROM clause. My query string looks like this: stmt_str:= 'SELECT :field
FROM :myTable blah blah blah...';
where field and myTable are later bound to a column and table name. However, dbms_sql.parse gives me an error: ORA-00923: FROM keyword not found where expected. I've checked and rechecked the string, but have found no obvious errors. Is there another way to approach what I'm trying to do?
-- ...Alan... "Have you seen a rubix cube around lately?? Slinky? What's happening to our world?" --Tey SteenbergenReceived on Mon Jul 24 2000 - 00:00:00 CDT
![]() |
![]() |