JawwadLone
Programmer
Hi everyone,
I am trying to build a dynamic query in a procedure. I want to pass the column names to the query form the front end in one parameter and table name in the second parameter field. I am writting this code
and receive following error
SP2-0734: unknown command beginning "p_query va..." - rest of line ignored.
SP2-0734: unknown command beginning "p_table va..." - rest of line ignored.
Select "p_query" From "p_table";
*
ERROR at line 2:
ORA-06550: line 2, column 25:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 2, column 3:
PL/SQL: SQL Statement ignored
I don't know exactly how to use these parameters in my select query.
Regards,
Jawwad Lone
I am trying to build a dynamic query in a procedure. I want to pass the column names to the query form the front end in one parameter and table name in the second parameter field. I am writting this code
Code:
p_query varchar2 :='TEST_ID,TEST_NAME';
p_table varchar2 :='TEST'
begin
Select "p_query" From "p_table";
end;
and receive following error
SP2-0734: unknown command beginning "p_query va..." - rest of line ignored.
SP2-0734: unknown command beginning "p_table va..." - rest of line ignored.
Select "p_query" From "p_table";
*
ERROR at line 2:
ORA-06550: line 2, column 25:
PL/SQL: ORA-00942: table or view does not exist
ORA-06550: line 2, column 3:
PL/SQL: SQL Statement ignored
I don't know exactly how to use these parameters in my select query.
Regards,
Jawwad Lone