数据操作数据
alter table AE_SYS_AENAME add IS_LINK VARCHAR2(2);
--字段备注(AE_SYS_AENAME.IS_LINK)
comment on column AE_SYS_AENAME.IS_LINK
is '是否关联其他事件 1 是 2 否';
update ae_sys_cause a set a.sort=(select b.sort from ae_kb_cause b where a.kbcauseid=b.id );
--根据原因库的数据刷新事件分析的原因顺序
update ae_ana_cause_info a set a.sort =(select b.sort from ae_kb_cause b where a.causeid = b.id);
select * from sys_user_role
insert into sys_user_role(
select id,ROLEIDS from sys_user where id='1944')
insert into ae_rep_outcome_user value
(select sys_guid(),
a.repid,
a.id,
a.outcometype,
a.outcometext,
a.filename,
a.fileurl,
a.iscache,
a.create_by,
a.create_date,
a.update_by,
a.update_date,
a.remarks,
a.del_flag,
a.outcomestate,
a.outcomedate,
a.out_office,
a.out_off_name,
a.out_user,
a.out_user_name
from ae_rep_outcome a);
update ae_rep_outcome a
set a.out_num = '1',
COME_STATE = (case
when ISCACHE is null then
'1'
when OUTCOMETYPE = '1' then
'2'
else
'3'
end),
a.out_office =
(select b.rep_deptid from ae_rep_info b where b.id = a.repid),
a.out_user =
(select b.rep_userid from ae_rep_info b where b.id = a.repid);
insert into ae_rep_outcome_user value
(select sys_guid(),
a.repid,
a.id,
a.outcometype,
a.outcometext,
a.filename,
a.fileurl,
a.iscache,
a.create_by,
a.create_date,
a.update_by,
a.update_date,
a.remarks,
a.del_flag,
a.outcomestate,
a.outcomedate,
a.out_office,
a.out_off_name,
a.out_user,
a.out_user_name
from ae_rep_outcome a);