Search code examples
csvsql-loadercontrolfile

How to ignore " while loading data from csv through sql loader


Fields in my csv file are enclosed by ". So I have to use optionally enclosed by '"' clause in my control file. But in some rows, value of a field also contains " hence it gives an error while loading the data from those rows. How to get over that error.


Solution

  • Your data source needs to change their enclosing character as it simply cannot be the same as any character found in the data.

    Even better, use pipes (or another character that is not in the data) as a separator and forgot enclosing fields in quotes.

    Failing that, you'll have to preprocess the data yourself and take care of the problem.