Oracle SQL Upating a not null column with an empty string -


i having issue writing sql update statement, need update not null field empty string.

update channel_mgmt.channels     set registered_address_id=p_address_id         ,vendor_id=p_spc_code      id=v_channel_id; 

in case, p_spc_code, can set '', , running sql error when run this:

error report: ora-01407: cannot update ("channel_mgmt"."channels"."vendor_id") null ora-06512: @ line 8973  01407. 00000 -  "cannot update (%s) null" *cause:     *action: 

any ideas how can around this? need use empty string cases, unsure why oracle complaining 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) 

have tried using ' ' (string 1 space in it)? if varchar, believe comparisons (for cases, i.e. you're not specifying compare white chars) work expected.

what mean ' ' = ' ' (single , double whitespace) should evaluate true varchar fields.

(i don't have instance of oracle can't sure...)


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -