Thursday, May 13, 2010

ssis varbinary column removing first 2 hexadecimal values


if any of the columns are varbinary and if you are exporting the data into a text file, by default ssis

will remove the first 2 letters ox. to troubleshoot this below technique will help.

first convert the filed to varchar and then use the query inside a cte to avoid the problems with type

conversion in ssis

with cte as
select col1,col2, CONVERT(varchar(max), col3, 1) as col3
from mytable
select * from cte

No comments:

Featured Post

SQL Server AWS Migration BCP

stored procedure to generate BCP scritps to migrate the SQL Server database. Developed this stored procedure on my labs to simulate the Mi...