I am trying to populate DB from CSV file.
My issue is that sometimes I might have quote and comma in spreadsheet and this will break my import.
So imagine you have in excel spreadsheet these values that I need to import into DB:
Code: Select all
Test
Te,st
Te"st
Te,"st
Test"
"Test
"Test,
Code: Select all
Test
"Te,st"
"Te""st"
"Te,""st"
"Test"""
"""Test"
"""Test,"
if string contains only one " remove them
if string contains two or three " one after the other replace them with one "