• Line breaks meaning carriage returns. I have an SSIS package that dumps out tables from a database into flat files and I have to verify the counts in the files match the table sizes. My package creates SQL statements for each table. For each field that is of type char, varchar, text, etc., I replace the carriage returns with some other marker. (We use ^^).

    The query for a single table looks like:

    select field1, replace(field2, Chr(13) & char(10), '^^'), field3...from myTable

    The package then opens up each sql statement and a single script task generates the output data (as opposed to using a data flow task).

    Just to be thorough, once the output files are created I have another script task that opens each one, counts the lines and compares the line count to what is expected. If a line count is off for a single file the package fails and my log table has an entry indicating which file's count was off.