免费注册 查看新帖 |

Chinaunix

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

bcp在命令行中正确执行,但是在bat文件中报错! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-27 13:52 |只看该作者 |倒序浏览
数据库版本:12.5.0.3
bcp语句:bcp umvc..TEST in D:\test\test\bcp1.bcp -e c:\bcp_error_1.txt -b 1000 -c -t "[email=$$@@$$]$$@@$$[/email]" -r "@#$%" -U umvc -P p9o8i7 -S SYBNM

同一条语句,在开始->运行->cmd中可以正确执行
但是将此语句拷贝到update.bat中执行时,报如下错误:
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.
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.
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.
bcp copy in failed

论坛徽章:
0
2 [报告]
发表于 2007-08-27 14:00 |只看该作者
修正一下
-t的分隔符是“$$@@$$”
不知道为什么发帖子的时候会被系统改掉

论坛徽章:
0
3 [报告]
发表于 2007-08-27 16:08 |只看该作者
我估计就是分隔符所造成的

论坛徽章:
0
4 [报告]
发表于 2007-08-28 10:26 |只看该作者
可是它在命令行中是可以正确执行的啊

论坛徽章:
0
5 [报告]
发表于 2007-08-29 13:43 |只看该作者
因为 % 在 bat 里面是特殊字符
你试试 这个语句
bcp umvc..TEST in D:\test\test\bcp1.bcp -e c:\bcp_error_1.txt -b 1000 -c -t "[email=$$@@$$]$$@@$$[/email]" -r "@#$%%" -U umvc -P p9o8i7 -S SYBNM

论坛徽章:
0
6 [报告]
发表于 2007-08-29 16:55 |只看该作者
果真可以了,谢谢楼上

论坛徽章:
0
7 [报告]
发表于 2007-09-02 20:51 |只看该作者
偶也来看看.............
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP