Import varbinary data

2019-08-29 23:24发布

After we used the Export column comp.(https://stackoverflow.com/questions/12712632/export-varbinarymax-column-with-ssis) we want to import the flat file into the db. when i try to import the varbinary column (even to a test table with varbinary column) , an FF character are added to varbinary data (at the end ) with no reason . in order to import the file i choosed in the flat file properties the next options : unicode,unsigned the column names in the first data row and in columns tab i added a {|}{@}{|} row delimiter in order to get one row for one column . when i run the packg. in inserts the varbinary data with FF trailing at the end off course the details are invalid . do you have any idea from where these characters appeared ?

标签: ssis
1条回答
Animai°情兽
2楼-- · 2019-08-30 00:19

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.

查看更多
登录 后发表回答