Inserting and Updating Checkbox values in database
401767Jul 15 2008 — edited Sep 1 2008Hi
I have two columns in the COLORS table and the columns are:
ORDER_NO
COLORS
The user is filling out an order form with the following checkboxes P10_CHK_COLORS with the following LOV values:
RED
BLUE
GREEN
YELLOW
BLACK
The user checks off:
RED
BLUE
GREEN
The user submits it and these values are saved into my table called COLORS. So the values I have for the table are for the:
ORDER_NO COLORS
---------- -----------------
10000 RED
10000 BLUE
10000 GREEN
However, the user made a mistake and opens the form again and changes the selection. Now the person has checked:
BLUE
BLACK
YELLOW
The user unselects
RED
GREEN
and submits the form to update the colors.
This is how the table should look like after the user modified the colors on the order:
ORDER_NO COLORS
---------- -----------------
10000 BLUE
10000 BLACK
10000 YELLOW
Does anyone have the code on how to write the update/delete/insert statement to show the change in colors from the checkbox. This would be great appreciated.
Thanks a bunch.
Cheers
Ray