Hello,
I inserted a .csv file into the database using DTS and it get inserted successfully.
But my problem is, the csv file contains the datas that has double quotes on it (eg: 1/2" iron rod, 3/4" wooden rod).
When I checked the inserted datas, it was inserted as "1/2" iron rod, 3/4"""," 3/4" wooden rod"".
How do I eliminate these additional double quotes.
Raviraj Danasekaran
The pattern of what it did (per your example) doesn't make sense to me.
That said, one way would be to update the affected columns using a replace function.
update my_table
set my_problem_column = replace(my_problem_column,'""','"')
(that's a single quote followed by two double quotes followed by a single quote, then a comma, then a single quote followed by a double quote and a single quote.)
That's a brute force method, but it might work to fix the problem if it's a one-time thing.
You might need to adjust your dts packages, there might be some values you can set that would change the quote handling behavior.
No comments:
Post a Comment