Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import CSV - Comma problem

Status
Not open for further replies.

innu

Programmer
Jun 13, 2001
40
AT
Hi!

I import a csv-file and I have the following problem.

I have a numeric field, where the comma is ',' and not a '.' So if I want to import this file (MS-SQL), he says to me, that it isn't possible.

How can I substitute the ',' through '.'? Who can tell me?
 
You can try to import data first into a staging table and then you can write a SP/SQL statement that makes use of "replace" function to clean up the data that contains "," with "." and then finally put that data back to the actual table.
 
Ditto. That's also the approach I've had to use with data where there is embedded quote marks and/or, if using unquoted strings, embedded commas. Robert Bradley
Sr. DBA, some big company
cheap prints and oil paintings:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top