I have a plsql function as below:
CREATE OR REPLACE FUNCTION test_function_f(p_view_name in varchar2 default null)
return varchar2 is
sql_qry varchar2(2000) := null;
emp_tot varchar2(500) := null;
begin
sql_qry := 'select count(*) from '||p_view_name;
execute immediate sql_qry into emp_tot;
return emp_tot;
end;
/
show errors;
and I call above function in a procedure.
create or replace procedure test_proc_p(p_view_name in varchar2 default null) is
tab_count varchar2(50) := null;
begin
tab_count := test_function_f(p_view_name);
dbms_output.put_line('the count: '||tab_count);
end;
/
sho err;
My table/View name is like this: /BIC/CUSTOMER
How to pass this table to the above procedure/function??