Suppose I have a CSV file like this:
1,"abc",,,,
2,"def",,,"ghi",
3,,"jkl",,,"mno"
Now I need to transform it in 3 steps:
- Replace all empty spaces with the String
NULL
- Add at the beginning of each line the String
VALUES (
- Add at the end of each line the string
);
So that I have:
VALUES (1,"abc",NULL,NULL,NULL,NULL);
VALUES (2,"def",NULL,NULL,"ghi",NULL);
VALUES (3,NULL,"jkl",NULL,NULL,"mno");
I would like to use Notepad++ or something similar.
This is needed in order to transform the csv into a valid sql file.