0

在我们使用导出列 comp.( https://stackoverflow.com/questions/12712632/export-varbinarymax-column-with-ssis ) 后,我们要将平面文件导入数据库。当我尝试导入 varbinary 列(甚至到带有 varbinary 列的测试表)时,一个 FF 字符被无缘无故地添加到 varbinary 数据中(最后)。为了导入我在平面文件属性中选择的文件,下一个选项:unicode,未签名第一个数据行和列选项卡中的列名,我添加了一个 {|}{@}{|} 行分隔符以获得一行一列。当我运行packg时。in 在末尾插入带有 FF 尾随的 varbinary 数据,当然细节是无效的。你知道这些角色是从哪里出现的吗?

4

1 回答 1

0

Unless I'm misunderstanding the layout of your file (all the data is in a single file) and 1 file = 1 row in the target table. With that assumption in place, you'll want to do much as I described in this answer on insert XML file in SQL via SSIS

In the section where I note "Make note of the ID here" change the data type from NTEXT to IMAGE and everything else should work the same.

于 2012-10-14T21:08:30.350 回答