SQLite Forum

Issue importing csv file to db
Login
Dear, I have a "small" problem doing the import of a txt file with csv mode, the file is just over 13 million records, but the import does not bring all of them to the db, from record 11million approx onwards one that another record is left out, thus until completing almost 300,000 records, the text file is in this format:
123456|names|surnames|addresses|etc|etc


prior to import I perform an ANSI->UTF8 conversion from the text file.

the uncompressed txt file size is 1.3gb
http://www2.sunat.gob.pe/padron_reducido_ruc.zip

The importation was done through:

c:\sqlite3.exe -csv -init config.cfg CONSULT.db ""

where config.cfg contains:

CREATE TABLE IF NOT EXISTS SUNAT("RUC" INTEGER PRIMARY KEY, "NOMBRE O RAZÓN SOCIAL" TEXT, "ESTADO DEL CONTRIBUYENTE" TEXT, "CONDICIÓN DE DOMICILIO" TEXT, "UBIGEO" TEXT, "TIPO DE VÍA" TEXT, "NOMBRE DE VÍA" TEXT, "CÓDIGO DE ZONA" TEXT, "TIPO DE ZONA" TEXT, "NÚMERO" TEXT, "INTERIOR" TEXT, "LOTE" TEXT, "DEPARTAMENTO" TEXT, "MANZANA" TEXT, "KILÓMETRO" TEXT);
.import padron_reducido_UTF8.txt SUNAT 

any ideas...

Thanx in advance