Use Value of Select List as Column Name in Update Statement?
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!