List:General Discussion« Previous MessageNext Message »
From:John Kebbel Date:May 31 2007 2:42pm
Subject:Moving Data between Tables
View as plain text  
I moved information about our school locks (serial numbers, combinations, student, etc)
from FileMaker to MySQL into a table called lockers and wrote PHP pages so our teachers
could record the locks returned at the end of the year. Unfortunately, I missed
transferring close to 200 locks. 

I duplicated the structure of lockers (1313 locks) as
lockers2 and reloaded all the information from Filemaker (1492 locks). My problem is
moving the information from lockers to lockers2 that was added AFTER the Filemaker
migration (2nd semester teacher, returned, paid). 

This is what I'm getting set to try,
but I've never seen a JOIN in an update statement before. Am I on the right track for
this?

UPDATE lockers2 SET lockers2.returned = lockers.returned, lockers2.teacher2nd =
lockers.teacher2nd, lockers2.paid = lockers.paid WHERE lockers2.serialNumber =
lockers.serialNumber;
Thread
Moving Data between TablesJohn Kebbel31 May
  • Re: Moving Data between TablesBaron Schwartz31 May
RE: Moving Data between TablesJohn Kebbel31 May