tanhaaiyaaN

Notes from the underground!

Archive for July, 2007

Mysql – Appending data

Problem: Appending data from one table to another table where duplicate might exist. Solution: A simple “Insert into table2 select * from table1″ query will give errors saying “duplicate records exist”, to go around it, the following query should do the job: INSERT INTO MASTERTABLE SELECT * FROM NEWTABLE WHERE NEWTABLE.`UNIQUEID` NOT IN (SELECT `UNIQUEID` [...]

Share
Read the rest of this entry »