Misallignment of reports - csv file

  • Hello.I have a report that is being save on .csv file.But when I check the output records with comma (,) the program considered the value of comma (,) as a new field.This resulted to misallignment of some records on my report.

    From flat file connection manager editor,i tried to put double quote(") under text qualifier but the output is still not aligned.

    Error output:

    Fieldname1 Fieldname2 Fieldname3

    a b c

    Expected result:

    Fieldname1 Fieldname2 Fieldname3

    a,b,c d e

  • A CSV file is, by definition, a file that separates distinct values with a comma. So any non-qualified comma marks the beginning of the next field.

    So, for your expected output of:

    Fieldname1 Fieldname2 Fieldname3

    a,b,c d e

    your CSV file would look have to look like this:

    "a,b,c",d,e

    hth,

    Tim

    Tim Mitchell, Microsoft Data Platform MVP
    Data Warehouse and ETL Consultant
    TimMitchell.net | @Tim_Mitchell | Tyleris.com
    ETL Best Practices

  • In your flat file connection manager on the general tab make sure you have text qualifier set to " or whatever you want to put around text fields. Leaving it as the default <none> will cause your problem.

    You can also change the column delimiter from comma to something else on the columns tab if you wish.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply