insert into ku1..lb1
select * from ku2..lb1 t2 where t2.leavedate is not null and id=7002insert into ku1..lb2
select * from ku2..lb2 t2 where t2.leavedate is not null and id=7002insert into ku1..lb3
select * from ku2..lb3 t2 where t2.leavedate is not null and id=7002insert into ku1..lb4
select * from ku2..lb4 t2 where t2.leavedate is not null and id=7002
select * from ku2..lb1 t2 where t2.leavedate is not null and id=7002insert into ku1..lb2
select * from ku2..lb2 t2 where t2.leavedate is not null and id=7002insert into ku1..lb3
select * from ku2..lb3 t2 where t2.leavedate is not null and id=7002insert into ku1..lb4
select * from ku2..lb4 t2 where t2.leavedate is not null and id=7002
解决方案 »
- SQL拼凑语句问题
- 请问如何做增量备份用T-SQL语句写
- 我想做个缴费的系统,缴过费的状态为"已缴费",未缴费的状态为"未缴费",缴费满一年了自动变为“欠费”,请问怎么做为好?
- 分页存储过程,有一个小错误,找不出来,求助
- 人员关联群组,部门查询
- 一个有点麻烦的问题!有image类型字段表格的操作问题!
- 加急 数据库变的好慢,用SQL profiler 查看后发现Audit Logout 占用资源最多,如何治乎??
- 数据库的设计是否有更优化方案
- SQL中的 in问题
- 这个SQL语句为什么不执行?
- 急求一个sqlserver2000标准版的序列号?
- 判断两个地址是否有60%的内容相符的函数要怎么写?
goinsert into ku1..lb1 select * from lb1 where leavedate is not null and ID = 7002
insert into ku1..lb2 select * from lb2
insert into ku1..lb3 select * from lb3
insert into ku1..lb4 select * from lb4
insert into ku1.dbo.lb2 select * from ku2.dbo.lb2 t2 where t2.leavedate is not null and id=7002
insert into ku1.dbo.lb3 select * from ku2.dbo.lb3 t2 where t2.leavedate is not null and id=7002
insert into ku1.dbo.lb4 select * from ku2.dbo.lb4 t2 where t2.leavedate is not null and id=7002
begin
insert into ku1..lb1 select * from lb1
insert into ku1..lb2 select * from lb2
insert into ku1..lb3 select * from lb3
insert into ku1..lb4 select * from lb4end