免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 8811 | 回复: 14
打印 上一主题 下一主题

bcp 导入文本文件出错 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-12-02 16:48 |只看该作者 |倒序浏览
bcp 库名..表名 in d:\load\data\aa.txt -U*** -P*** -S*** -c -t "|"

数据:
operator_id|role_id
root|1
byroot|1
dsroot|1
hzroot|1
yxroot|1
lwroot|1
fcroot|1
shroot|1
hproot|1
ctroot|1
chroot|1
hdroot|1
pyroot|1
zcroot|1

错误提示:

Starting copy...
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation was stopped due to a syntax error in the source field.
Unexpected EOF encountered in BCP data-file.
bcp copy in failed

论坛徽章:
4
2015年亚洲杯之阿联酋
日期:2015-03-10 10:32:022015年亚洲杯之阿曼
日期:2015-03-10 14:53:222015亚冠之水原三星
日期:2015-07-18 15:40:262015亚冠之塔什干棉农
日期:2015-07-27 20:52:05
2 [报告]
发表于 2005-12-02 16:49 |只看该作者
sp_help **

论坛徽章:
0
3 [报告]
发表于 2005-12-02 17:14 |只看该作者
??

论坛徽章:
0
4 [报告]
发表于 2005-12-02 18:10 |只看该作者
文本和表结构不一致。

论坛徽章:
0
5 [报告]
发表于 2005-12-04 21:27 |只看该作者
试一下把 -t后面跟的参数改一改,如改为-t_#_  或者其他的参数。

论坛徽章:
0
6 [报告]
发表于 2005-12-04 22:38 |只看该作者
在后面增加-zus_english试一下

论坛徽章:
0
7 [报告]
发表于 2005-12-05 10:12 |只看该作者
我也遇到了跟楼主同样的问题,这个跟字符集有关系?

论坛徽章:
0
8 [报告]
发表于 2005-12-05 11:40 |只看该作者
SYBASE建议用DBCC CHECKTABLE(MASTER..SYSLOGINS)试试看。

论坛徽章:
0
9 [报告]
发表于 2005-12-05 19:16 |只看该作者
Starting copy...
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N36/1/0:
cs_convert: cslib user api layer: common library error: The result is truncated
because the conversion/operation resulted in overflow.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
CSLIB Message:  - L0/O0/S0/N24/1/0:
cs_convert: cslib user api layer: common library error: The conversion/operation
was stopped due to a syntax error in the source field.
Unexpected EOF encountered in BCP data-file.
我导入文本的时候也是这样.

论坛徽章:
0
10 [报告]
发表于 2005-12-06 00:34 |只看该作者
加-e errorfile参数,看看是哪几行造成导入失败。
如果从头开始一直失败,应该是文本格式错误或字符集不匹配的原因。
建议楼主给出表结构和数行bcp文本,方便其他人查错。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP