william-CuiCui0705

sql导出到excel

1、先查询数据ID,别名  导出到excel

2、增加标准名称,标识错误数据,导入sqlServer

select distinct [StandardName] from [GMSOA].[dbo].[校准$]
distinct 排除相同数据,只显示一次
3、sql将查询到的数据插入另一张表(数据列名)
insert into GMSOA.dbo.SN(SN)   select distinct  SN from Standard
4、将查询到的数据更新到另一张表"update a set a.name=b.name1 from a,b where a.id=b.id"
Update SN
set SN.CNAS=s.CNAS,SN.PRO=s.PRO
from SN,
(Select SN,CNAS,PRO from SNN)s
where SN.ID=s.ID
and EngineerInfo.Deleted=\'False\'or EngineerInfo.deleted is null
 

分类:

技术点:

相关文章:

  • 2021-12-04
  • 2021-12-03
  • 2021-07-31
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2022-12-23
  • 2021-12-14
猜你喜欢
  • 2022-01-05
  • 2021-12-02
  • 2021-08-31
  • 2022-01-20
  • 2021-10-24
  • 2021-12-28
  • 2021-12-04
相关资源
相似解决方案