两个步骤

第一、设置外围应用配置器

sql导入excel进入 - 功能的外围应用配置器 - xp_cmdshell 启用

第二、利用BCP,如下例语句

EXEC master..xp_cmdshell 'BCP "select title, CONVERT(varchar(12) , times, 111 ) as times from information.dbo.information where [type]=7" queryout c:\abc.xls -c -U"sa" -P"123"'

相关文章:

  • 2021-12-24
  • 2021-12-27
  • 2022-12-23
  • 2021-12-04
  • 2021-11-19
  • 2021-12-23
  • 2021-09-13
  • 2022-01-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案