Home > Net >  Decimal separator while importing a flat file in SSMS
Decimal separator while importing a flat file in SSMS

Time:12-15

I have an issue while importing a flat file into SSMS. As I download a CSV file from a specific system, the decimal separator is always ".". I have a regional setting of comma and I use commas all the time. But when importing these CSV files into SSMS, I get an error of type mismatch, due to the fact that SSMS cannot recognize the values as numbers (float, decimal, etc.)

I have tried to switch the regional Windows settings and replaced dot with a comma, which solved the issue and imported the file, but the question is, am I able to change settings in SSMS somehow so I am able to keep comma as default but import CSV files with decimal point separator?

I need to work only with SSMS, I am unable to install SSIS packages.

Thank you very much for any feedback.

CodePudding user response:

In SSMS select "Import Data" option then in "Data Source" select "Flat File Source". Select file to load and then change "Locale" option (located just below file name).

Locales control how data formats are displayed and interpreted such as currency symbols and radix (decimal separator) character.

  • Related