dawugui(潇洒老乌龟) ,fcuandy(手中无剑,心中亦无) ,marco08(天道酬勤)......都在哪里啊?
exec master..xp_cmdshell 'bcp ''select * from table where keyin=''1'''' query out c:\Temp.xls -c -q -S''dev'' -U''sa'' -P''pw'' '
执行后出现output信息如下:
复制方向必须是 '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
消息里显示(所影响的行数为 13 行)
可是我到C盘上没看到Temp.xls文件