13

Moving columns around

view full story
linux-howto

http://www.unix.com – This is a mysql night mare that I cant seem to wrap my head around. Any shell based answers is appreciated as I dont know Perl and all I would do would be blindly copy & paste ! FILE CONTENTS - 1389685 INSERT INTO Opera_ShirtCatlog(col1,col2) VALUES (1,'TEST1'),(2,'TEST2'); 1389675 INSERT INTO Opera_ShirtCatlog_Wom(col1, col2, col3) VALUES (9, 'Siz12, FormFit', 'Test'); DESIRED OUTPUT - INSERT INTO Opera_ShirtCatlog(col1,col2,FIRSTCOL) VALUES (1, 'TEST', 1389685); INSERT INTO Opera_ShirtCatlog_Wom(col1, col2, col3, FIRSTCOL) VALUES (9, 'Siz12 FormFit', 'Test', 1389675); (HowTos)