窗口函数更新
16lz
2021-02-25
update ex_port_inspection
set authority = rt.authority, port_name=rt.port_name
from (
SELECT lag(rid, -1) over(partition by imo order by report_date desc) as pre_rid,*
from ex_port_inspection
where imo ='8710156'
order by imo,report_date desc
) rt
where ex_port_inspection.imo ='8875061'
and (ex_port_inspection.port_name is null or ex_port_inspection.port_name='')
and ex_port_inspection.rid = rt.pre_rid
你的鼓励让我更有动力
赞赏
0人进行了赞赏支持
更多相关文章
- Oracle OCP 19c 认证1Z0-083考试题库(第4题)
- Detach RDM Luns from single ESXi host
- 12c pdb ora-01033
- 2021.2.23
- 西门子PLC s7-1200 1500 modbus-rtu通信实例编程详细指导
- zabbix报错:Error of query maxQueryMetrics
- 2021-2-23:Java 文件映射内存是如何更新到硬盘文件的,什么情况下会
- Oracle OCP 19c 认证1Z0-083考试题库(第1题)
- centos 将本地代码软链到web服务代码目录