Updating 2 Columns using Execute Immediate
This would be my first post after reading many articles in the internet, and it seems I haven't run into a page that would explain if it really is possible to update two columns using execute immediate... or i just didn't tried searching for more *scratch head.
Problem: I am running a PL/SQL block wherein a statement is set and when i use execute immediate 2 columns in the given table is then updated. Scenario below.
Code Sample:
L_statement := 'update table1 '||
'set col_1 = value '||','||
'set col_2 = value';
EXECUTE IMMEDIATE L_statement;
That's a chunk of code from my PL/SQL Block. Is there a way to update 2 columns using 1 statement? I tried using 2 statement and executed both at the same time, it worked just fine but still I wanted to make it compact.Last, I just wanted to minimize and simplify the code and it would look better and will give me the option expand the code.
Any help is appreciated.
Thanks!
Anthony