I use SSIS to migrate some csv files (from UNIX) into SQL. one csv file contains data like:
ID,Name,Desc
1,12345\t,12345\177
If the schema for Name or Desc must be varchar(6), then the migration will fail due to the non printable characters are presented as \t, \177...
How can I convert the escaped characters to non printable characters in SSIS?
\t to Char(9)
\177 to Char(127)
Is there a better solution?
You should be able to use regular expressions regex.unescape to do this. I would suggest loading the assembly and doing it in SQL server using a temporary table, check this out http://msdn.microsoft.com/en-us/magazine/cc163473.aspx