sql語句,匯出成excel

2021-05-22 01:08:29 字數 471 閱讀 4319

--exec master..xp_cmdshell  'bcp "select * from [gico.management].[dbo].[tb_user]" queryout "c:/abc.xls" -c -s"192.168.0.2,11433" -u"sa" -p"123456"'

-- 下邊那句話必須寫成一行,換行就掛了,靠,我也不知道原因。

exec master..xp_cmdshell  'bcp "select [companyname] ,[linkmanname] ,[linkmanphone] ,[linkmancellphone],[inputdate],[remarkinfo],[address] from [gico.management].[dbo].[tb_custominfo] where userid=73 " queryout "c:/abc.xls" -c -s"192.168.0.2,11433" -u"sa" -p"123456"'

SQL語句匯入匯出Excel

匯出到excel exec master.xp cmdshell bcp settledb.dbo.shanghu out c temp1.xls c q s gnetdata gnetdata u sa p 匯入excel select from opendatasource microsoft....

MYSQL匯出成EXCEL表

select from xi table into outfile d test.xls 沒想到這麼簡單。匯出為txt檔案 select from xi table into outfile d test.txt 有時候有excel開啟的時候會出現亂碼,因為office預設的是gb2312編碼,伺服...

使用sql語句匯入 匯出 資料為Excel

匯出資料為excel exec master.xp cmdshell bcp fsebss.dbo.resource goodstype out c temp1.xls c q s yysoft 468er27v sql伺服器名稱 u sa 登入名 p 111111 密碼 從excel中匯入資料 i...