Good Afternoon,

I defined a table with 9 columns, the first reserved for loading.
CREATE TABLE ADDRESS (
"id" BIGSERIAL PRIMARY KEY,
ADDR VARCHAR(100),
CITY VARCHAR(100),
STATE VARCHAR(25),
ZIP VARCHAR(20),
POSTAL VARCHAR(20),
PROVINCE VARCHAR(20),
START_DATE VARCHAR(10),
END_DATE VARCHAR(100)
);

Command to populate:
COPY address (addr, city, state, zip, postal, province, start_date, end_date)
FROM 'C:/Projects/DHS/Data/xag.txt' DELIMITER ','

The input file, comma del and double quoted, Some of my input records I know the delim are messed up.

For example:
Good: "244 SOUTH OXFORD AVE. SUITE 2","LOS ANGELES","CA","90004",,,"2014-07-25-00.00.00.000000","9999-01... <--- 8 fields
This loads great and looks good in db with the assigned key incriments each time..

Bad: "244 SOUTH OXFORD AVE., SUITE 2" , "LOS ANGELES","CA","90004",,,"2014-07-25-00.00.00.000000","9999-01... <-- 8 but the extra comma throws off copy statement
Sholud be

**The second record has an extra comma present and fails to load as it indicates to db copy statement there are more than 8 colmuns,

Desired Results;
If encountered continue procesing and write reject to table or file..Any option so I can get the data loaded, millions of records to load.

Thanks for your time and glad to be a new member!