|
-
The concept worked but not the implementation that i wanted.
Say when i execute the statement using "EXECUTE IMMEDIATE", i have to replace the variable ll_val1 & ll_val2 with the actual values, otherwise it prompts me with the following error
Declare
ll_val1 number(5) := 25;
ll_val2 number(5) := 50;
ll_formula varchar2(100) := 'll_val1 + ll_val2';
ll_result number(7) := 0;
begin
dbms_output.put_line('ll_val1 : ' || ll_val1 || ' , ll_val2 : ' || ll_val2 );
EXECUTE IMMEDIATE ('Select ' || ll_formula || ' From dual') INTO ll_result;
dbms_output.put_line(ll_result);
end;
/
ERROR at line 1:
ORA-00904: "LL_VAL1": invalid identifier
ORA-06512: at line 8
so, i had to change ll_formula := '25 + 50' to get the result.
So, as of now my problem is not solved.
Regards,
Surajit K Mitra
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|