I have a dump file with various
INSERT statements. The file looks something like
start_lines INSERT INTO table1234 … INSERT INTO table1234 … INSERT INTO table1234 … INSERT INTO table7890 … INSERT INTO table7890 … INSERT INTO table7890 … end_lines
I need all the
INSERT INTO table7890 statements to go above the
INSERT INTO table1234 statements. I would like to keep all the
end_lines in the same position they were before the switch occurs. So, for instance, if the
start_lines occupy lines 3 through 18, after switching the insert statements, they should continue to appear 3 through 18. Ditto for the end lines.
How do I switch the groups of statements ?