Sreenu131
Sreenu131

Reputation: 2516

Issue with commas in the column while exporting SQL Server query result to .csv file with double quotes the data is splitting up to next columns

I have an issue with commas in the column while exporting SQL Server query results to a .csv file. The data is splitting up to next columns with double quotes, using SSIS.

This is my sample data:

EmpId    Location    Dept
---------------------------
 101     Nyc,AUS     It,HR
 102     Nyc,AUS     It,HR

When exporting this data into a .csv using SSIS, the data is splitting next column though I used text-qualifier double quote (").

Any suggestions will be appreciated

Upvotes: 1

Views: 1223

Answers (1)

Armin_H
Armin_H

Reputation: 36

You might want to use another column delimiter, such as ";" instead of "," when exporting it to .csv When using text qualifier you have to make sure they are applied on the export also. Open your .csv by notepad++ or any text editor and see if each Location-entry is surrounded by double quotes (")

Upvotes: 2

Related Questions