I have written a perl script that outputs a SQL script. I need to modify the outputted SQL so that if there is a duplicate Company Name, their info dumped somewhere for an audit.
One of my current dumped lines looks like this:
How can I modify this outputted line so that if there is another "!!!! TEST BUILDER" but with a different address, it dumps the above info into a seperate table, so I can manually compare the two entries and decide which one is correct?
One of my current dumped lines looks like this:
Code:
INSERT INTO companies (Company, Profession, Town, County, Postcode, Country, Telephone, Fax, `Email Address`, Website, `Rep Override`) VALUES ('!!!! TEST BUILDER', 'Builder', 'b', '', '', 'England', '01234 555666', '01234 666777', 'me@here.com', '', 'John Smith');
How can I modify this outputted line so that if there is another "!!!! TEST BUILDER" but with a different address, it dumps the above info into a seperate table, so I can manually compare the two entries and decide which one is correct?