I am having an issue writing an SQL Update statement, where I need to update a not null field with an empty string.
UPDATE channel_mgmt.channels
SET registered_address_id=p_address_id
,vendor_id=p_spc_code
WHERE id=v_channel_id;
In this case, p_spc_code, can be set to '', and I am running into a SQL error when I run this:
Error report:
ORA-01407: cannot update ("CHANNEL_MGMT"."CHANNELS"."VENDOR_ID") to NULL
ORA-06512: at line 8973
01407. 00000 - "cannot update (%s) to NULL"
*Cause:
*Action:
Any ideas how I can get around this? I need to use the empty string some cases, but I am unsure why oracle is complaining about a null value.
desc channel_mgmt.channels
Name Null Type
--------------------- -------- ------------------
ID NOT NULL NUMBER(16)
CHANNEL_STATUS_KEY NOT NULL VARCHAR2(64 CHAR)
REGISTERED_ADDRESS_ID NOT NULL NUMBER(16)
VENDOR_ID NOT NULL VARCHAR2(64 CHAR)