Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

The following query gives invalid table name. what is wrong with this?

3325576Mar 13 2017 — edited Mar 15 2017

create or replace PROCEDURE PROC_PURGE_BATCH_TABLES_TST

AS

V_TBL_NM VARCHAR2(30):='EMPLOYEES';

v_cnt number;

v_dt date := sysdate;

QUERY_1 VARCHAR2(1000);

begin

EXECUTE IMMEDIATE 'SELECT COUNT(1) FROM :1' INTO V_CNT USING V_TBL_NM;

end;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2017
Added on Mar 13 2017
15 comments
1,276 views