Enum mismatch issue

Options

I'm adding a bunch of records into a DB table using a loop. One of the fields is an enum type and occasionally the value being passed in does not match the enum.

e.g. enum = Apple, Pear. however the value = Watermelon.

Adding a null value into the enum field when this happens is an acceptable outcome.

Any suggestions?

Best Answer

Answers