更新表中所有符合条件的数据--使用…

--------------补全数据-------------------
update b set b.客户报告编号=a.客户报告编号 from FirstTable a inner join FinalTable b
on b.CrediteyesNO=a.CrediteyesNO where a.客户报告编号 is not null and b.客户报告编号 is null

update b set b.运营地址=a.运营地址 from FirstTable a inner join FinalTable b
on b.CrediteyesNO=a.CrediteyesNO where a.运营地址 is not null and b.运营地址 is null

update b set b.主营业务=a.主营业务 from FirstTable a inner join FinalTable b
on b.CrediteyesNO=a.CrediteyesNO where a.主营业务 is not null and b.主营业务 is null

update b set b.建筑面积=a.建筑面积 from FirstTable a inner join FinalTable b
on b.CrediteyesNO=a.CrediteyesNO where a.建筑面积 is not null and b.建筑面积 is null

 


--------------显示数据条数>>>>>>>>>>>>>>>>>>>>>
select distinct CrediteyesNO into #No from 国内订单表 where  委托时间 ='2011-09-15 15:30:00.000'and 委托公司名称 = '上海阿斯利康' and 完成情况='已完成' 
select CrediteyesNO into OtherNO from #No where #No.CrediteyesNO not in (Select CrediteyesNO from #temp1)

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值