How can I create an update so that the column REZOBR_INT2 is filled with data with different conditions. It turns out that the last condition works for me and overwrites the first two.
update t_table t set REZOBR_INT2 = '1.Дана Консультация' where ((type_id = 3) and EXISTS (select * from t_block_outboundmess w where date_redirect is null) and conect_id in (1,7) and present_id in (1) and EXISTS (select * from t_block_ger p where regname <> username)) and EXISTS (select * from t_block_ger p where date_end is not null); --commit; update t_table t set REZOBR_INT2 = '2.Рассмотрено обращение' where ((present_id = 2) and EXISTS (select * from t_block_outboundmess w where date_response is not null) and (letter_num is null) and EXISTS (select * from t_block_ger p where date_end is not null)); --commit; update t_table t set REZOBR_INT2 = '3.Заявление удовлетворено' where ((type_id = 2) and (satisf='ДА') and EXISTS (select * from t_block_ger p where date_end is not null)); --commit;
and REZOBR_INT2 not in('1.Дана Консультация', '2.Рассмотрено обращение')? - 4per