get count(*) from execute imm

get count(*) from execute imm

 

  

I need to get count(*) from a list of tables. I used the following statement in a procedure.

v_stmt := 'select count(*) from '||v_tablename||' where curr_flag=''Y'' returning count(*) into :a';
execute immediate v_stmt using out v_cnt_fdb;

But, I got an error. ORA-00933: SQL command not properly ended

Could anyone help? Thanks in advance.

Linda

Oracle LazyDBA home page