sakthikumar
asked on
'G_F01' is not a procedure or is undefined
I am trying to get the value of g_f01 variable through execute immediate.
I am getting error " 'G_F01' is not a procedure or is undefined.
when I use like below I am not getting any error.
DECLARE
B VARCHAR2(100);
BEGIN
SELECT apex_application.g_f01(1) INTO B FROM DUAL;
END;
but when i try i like this I am getting error
DECLARE
B VARCHAR2(100);
BEGIN
execute immediate 'SELECT apex_application.g_f01(1) FROM DUAL' INTO B;
END;
can anybody help.
I am getting error " 'G_F01' is not a procedure or is undefined.
when I use like below I am not getting any error.
DECLARE
B VARCHAR2(100);
BEGIN
SELECT apex_application.g_f01(1) INTO B FROM DUAL;
END;
but when i try i like this I am getting error
DECLARE
B VARCHAR2(100);
BEGIN
execute immediate 'SELECT apex_application.g_f01(1) FROM DUAL' INTO B;
END;
can anybody help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You could also have done -
declare
v_sql varchar2(255);
B varchar2(100);
begin
v_sql := 'SELECT apex_application.g_f01(1) FROM DUAL' ;
execute immediate v_sql into B;
One of the benefits of this method is that you can comment out the execute immediate statement and add a dbms_output.put_line(v_sql ) to see what you sql statement looks like before executing it.
declare
v_sql varchar2(255);
B varchar2(100);
begin
v_sql := 'SELECT apex_application.g_f01(1) FROM DUAL' ;
execute immediate v_sql into B;
One of the benefits of this method is that you can comment out the execute immediate statement and add a dbms_output.put_line(v_sql
ASKER