BCP查询如何编码varbinary(max),可以更改编码吗? [英] How does BCP queryout encode varbinary(max) and can I change the encoding?

查看:217
本文介绍了BCP查询如何编码varbinary(max),可以更改编码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个遗留系统,它具有存储在varbinary(max)列中的数据库中的图像字节数组(jpg)。 sql bcp用来创建写入平面文件的字符串的默认编码是什么?另外,我可以更改编码吗?

I have a legacy system that has byte arrays of images(jpg) stored in the database in varbinary(max) columns. What is the default encoding being used by sql bcp to create the string that it writes to the flat file? Also, can I change the encoding?

推荐答案

使用 bcp 默认格式是原生的,或者您可以强制使用 -n -N 也将工作,因为它存储非字符数据作为本机)。

When you output using bcp the default format is native or you can force that with the -n (-N will also work since it stores noncharacter data as native).

Kalman Toth的网站有一个例子
http://www.sqlusa.com/bestpractices/imageimportexport/

Kalman Toth's website has an example http://www.sqlusa.com/bestpractices/imageimportexport/

这篇关于BCP查询如何编码varbinary(max),可以更改编码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆