问题描述
- 关于bcp导出数据时使用queryout的问题
- EXEC master..xp_cmdshell 'bcp GTA_SeL1_TAQ_200601.dbo.SHL1_TAQ_600000_200601 out E:temp.xlsx -T -c -q';
EXEC master..xp_cmdshell 'bcp ''SELECT TDATETTIMECPS1B1 FROM GTA_SeL1_TAQ_200601.dbo.SHL1_TAQ_600000_200601''queryout E:temp.xlsx -T -c -q';
第一句可以执行,但是执行第二句句,老是提示以下内容,还请高手指点一下这是怎么回事?谢谢各位!
复制方向必须是 'in'、'out' 或 'format'。
用法: bcp {dbtable | query} {in | out | queryout | format} datafile
[-m maxerrors] [-f formatfile] [-e errfile]
[-F firstrow] [-L lastrow] [-b batchsize]
[-n native type] [-c character type] [-w wide character type]
[-N keep non-text native] [-V file format version] [-q quoted identifier]
[-C code page specifier] [-t field terminator] [-r row terminator]
[-i inputfile] [-o outfile] [-a packetsize]
[-S server name] [-U username] [-P password]
[-T trusted connection] [-v version] [-R regional enable]
[-k keep null values] [-E keep identity values]
[-h ""load hints""]
NULL
解决方案
这个问题很急,我一直在线等,没有人知道吗?谢谢!