D:>bcp /?
usage: 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"]
可是我偏偏
D:>bcp run..ofretmsg in -t=, -S 127.0.0.1 -T -i "d:msg.txt" -c
SQLState = S1000, NativeError = 0
Error = [Microsoft][ODBC SQL Server Driver]无法打开 BCP 主数据文件
为啥就不按照语法来呢
D:>bcp dbname..table in "d:msg.txt" -S 127.0.0.1 -T -c -t
开始复制...
已复制 163 行。
网络数据包大小(字节): 4096
总时钟时间(毫秒) : 15 平均值: (每秒 10866.67 行。)
使用逗号,做分割符的CVS文件
D:>bcp dbname..table in "d:/msg.CVS" -S 127.0.0.1 -T -c -t,
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/38085/viewspace-1027062/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/38085/viewspace-1027062/