Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE COL2 is NULL AND COL2=3;
OUTPUT Should be:
INSERT INTO TABLE_A (COL1,COL2,COL3) VALUES (1,NULL,3);
Many Thanks.