I am trying to use the 'copy' command for importing the csv file into my postgres table. Values containing commas have been surrounded by double quotes but I can't seem to find an option to load them into the postgres table without any errors using the 'copy' command.
'COPY' command I am using:
CREATE TABLE candidates (Sno int, name varchar, cases int, case_details varchar, .....);
copy candidates from 'something.csv' with NULL AS ' ' csv ;
Example of an offending csv line:
1, "some name", 2, "(1):IPC Sections - 147, 323, 352, 504, 506 , Other Details - Case no.283A/2000, A.C.J.M-5, Ghumangunj Ellahabad, UP, Dt.12.11.2000", .....
Above the case_details
attribute has commas in its value. That is my problem.