Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Use Value of Select List as Column Name in Update Statement?

73pixieGirlJul 30 2008 — edited Aug 1 2008
Hi!
I have a select list that is basically a list of field names in my table (:P2_WHAT_FIELD). The user will select which field they want to update then enter a value in a text field (:P2_DATE). I'm using a loop statement to update multiple records. How would I go about building my update statement using the value of the select list as my column name?

BEGIN
FOR i in 1..APEX_APPLICATION.G_F01.COUNT
LOOP
Update HR_EMP set :P2_WHAT_FIELD = :P2_DATE where EMP_ID = APEX_APPLICATION.G_F02(APEX_APPLICATION.G_F01(i));
END LOOP;
END;

Thank you!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2008
Added on Jul 30 2008
20 comments
1,392 views