我用了madpbpl的写了但不对
EXEC master..xp_cmdshell 'bcp SELECT hoscode, medcode FROM jchis..advice ORDER BY hoscode queryout C:\ authors.xls -c -S"jxxx" -U"sa" -P"sa"'
出现了提示
复制方向必须是 '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
能说详细点?