Results 1 to 3 of 3
Thread: SQL query
Nov 2, 2011, 23:28 #1
I have two mysql tables 'letter' and 'lettercopy' letter will daily populated with records. Lettercopy is a copy of letter table and once in a week it should copy the new records from letter to lettercopy. The records in letter will not get updated or deleted once inserted. I am looking for some kind of incremental copy. Can anyone tell me how the SQL should be. I tried insert ignore but it is not working.
Below is my table syntax. PFA the screenshot
I have tried the below SQL. But it is not working
INSERT INTO lettercopy (lid, alpha) SELECT letter.id as lid, letter.name as alpha FROM letter WHERE NOT EXISTS ( SELECT * FROM lettercopy WHERE lid = ( SELECT id FROM letter))
Nov 3, 2011, 03:15 #2Guido - Community Team Leader
The Votes Are In: The Winners of the 2013 Community Awards are...
Blog - Free Flash Slideshow Widget
Nov 3, 2011, 04:19 #3
- Join Date
- Jul 2002
- Toronto, Canada
- 53 Post(s)
- 2 Thread(s)