sql load file and various edits