I need to import flat files into a table each using SSIS, the files are delimited by a tilde "~", due to commas and double quotes being part of the text.
Unfortunately I found that sometimes, within the first column of some rows, there is an extra "~", which then of course, throws the whole file import off and columns out of synch. Currently, I write the error rows to another log file, but ideally would like to cleanse the files before import.
Is there a way to count the tildes from the last column to the first and remove the extra tildes from the row with Visual Basic Script or C# task in SSIS?
If anyone has such a script, please consider sharing with me.