set t1.Bks=
(select max(t2.EndTime) from t_diaoyonglian0703 t2
where t1.TraceID=t2.TraceID and t2.Site='bks')-
(select MIN(t2.BeginTime) from t_diaoyonglian0703 t2
where t1.TraceID=t2.TraceID and t2.Site='bks')
where t1.Date='0703'
按照描述这么写:
update 表名 t1set t1.name=(
select name from 表名 t2
where t2.pid=t1.pid and t2.name is not null and rownum=1
)
where t1.name is null
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)