merge into tbl_rest_realreststates t1
using view_v8_restcomput t2
on (t1.queue_id = t2.queue_id)
when matched then
update set
t1.Sigincount=t2.Sigincount,
t1.realbusy=t2.RealBusy,
t1.prebusy=t2.PreBusy,
t1.realbusyin04a06a100=t2.RealBusyIn04A06A100
when not matched then
insert values(t2.queue_id,t2.Sigincount,t2.RealBusy,t2.PreBusy,t2.RealBusyIn04A06A100)我在网上找的一段用merge的,我修改了一下,不能编译通过,错在哪里,谢谢大家
using view_v8_restcomput t2
on (t1.queue_id = t2.queue_id)
when matched then
update set
t1.Sigincount=t2.Sigincount,
t1.realbusy=t2.RealBusy,
t1.prebusy=t2.PreBusy,
t1.realbusyin04a06a100=t2.RealBusyIn04A06A100
when not matched then
insert values(t2.queue_id,t2.Sigincount,t2.RealBusy,t2.PreBusy,t2.RealBusyIn04A06A100)我在网上找的一段用merge的,我修改了一下,不能编译通过,错在哪里,谢谢大家
解决方案 »
- 请教ORACLE10g 连接 SYBASE 建立透明网关
- oracle 添加字段造成锁表
- 数据量很大,通过存储过程取数返回给一个中间件数据容器,但此中间件容器有瓶颈...
- 关于Oracle BLOB类型,一个String字符怎么写入BLOB字段?
- OracleOraHome92TNSListener启动不了,在线等.谢谢
- 请教: 存储过程
- sql server2000导出 ,导入oracle 怎末 表之间索引,主键全没了?
- 9i安装时出来欢迎对话框之后就再也不动了!!
- 关于ORA-01536的问题,急!
- 我想使用oracle+php来建立一个电子商务的站点,需要人手帮忙!
- 字符串拆分
- SQL类型转换
using view_v8_restcomput t2
on (t1.queue_id = t2.queue_id)
when matched then
update set
t1.Sigincount=t2.Sigincount,
t1.realbusy=t2.RealBusy,
t1.prebusy=t2.PreBusy,
t1.realbusyin04a06a100=t2.RealBusyIn04A06A100
when not matched then
insert values(t2.queue_id,t2.Sigincount,t2.RealBusy,t2.PreBusy,t2.RealBusyIn04A06A100,null)
那贴看过,t2的字段比t1少一个……,少的是最后一个,我加null处理的……