select sid, cjsj
from base_zjxx
where cjsj = to_date(‘0001/1/1‘, ‘yyyy/mm/dd‘);
select *
from sys_user
where qyid in (90656, 90655, 90646, 90641, 90636, 90633, 90631);
UPDATE base_zjxx
SET cjsj = (CASE
WHEN zjid = ‘90656‘ THEN
to_date(‘2015/4/7 15:57:49‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90655‘ THEN
to_date(‘2015/4/7 14:45:15‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90646‘ THEN
to_date(‘2015/4/3 10:45:01‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90641‘ THEN
to_date(‘2015/4/2 9:43:55‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90636‘ THEN
to_date(‘2015/4/1 15:58:11‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90633‘ THEN
to_date(‘2015/4/1 14:32:58‘, ‘yyyy/mm/dd hh24:mi:ss‘)
WHEN zjid = ‘90631‘ THEN
to_date(‘2015/4/1 10:30:23‘, ‘yyyy/mm/dd hh24:mi:ss‘)
ELSE
cjsj
END)
where zjid in (90656, 90655, 90646, 90641, 90636, 90633, 90631)
update base_zjxx t1 set
t1.cjsj =
(select CREATE_DATE
from sys_user t2
where t1.zjid = t2.sid ) where
t1.cjsj = to_date(‘0001/1/1‘, ‘yyyy/mm/dd‘)