Posterous theme by Cory Watilo

Filed under: transformation

I can do this, can you do that?

:'<,'>s:^\(\d\{12\}\)\s\+\([^;]\+\);\(...\);\s*$:insert into tmptablacskacska values ('\1',\2,'\3');:

És 7 másodperc múlva mind a 6 millió sor hibásan formázott CSV insert-é válotozott…

És akkor már csak az elsjére kellett beszúrni a drop & create table-t, meg néhány ezer soronként egy makróval a commit;-ot majd:

:w tmp.sql

:ConqueTermSplit bash

isqlplus tmp.sql

:q!