ITPub博客

首页 > 数据库 > 数据库开发技术 > 使用BCP导入数据犯的错

使用BCP导入数据犯的错

原创 数据库开发技术 作者:exocet 时间:2009-09-17 13:58:08 0 删除 编辑

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"]

[@more@]

可是我偏偏

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博客 ” ,链接:https://blog.itpub.net/38085/viewspace-1027062/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 公安局办户口
请登录后发表评论 登录
全部评论
  • 博文量
    45
  • 访问量
    1677084