Tough Qurry help

A

Anonymous

Guest
A little background might help here.
I have two tables one called final has 9000 entries, 9 colums, with one colum, "C" Containing some old data.
The new table final1 has 3000 entries, two rows "I" (Old Data) and "J" (New Data) . Since not all of the codes in the old table "Final" need to be replaced, only 3000 of them, And the new script has the 3000 that need to be replaced, I fuigured there has to be a way of querrying the two tables to Replace the old code with the new code if "C" found the old code it was equal to in "I"
I would like to change "final" where row C = "final1" colum I and replace that data with "final1" colum J
Hope that makes scense. This is bugging me.
Thanks everyone!
Michael
 
So let me make some sense of this:
You have a table, which contains information you want to change. The changes to be made are in a second table. You will cross reference the rows to change by values in the second table, and change it for another value which is in the second table?

If this is the case, just use PHP. What you want to do is select I and J from table1, and while it lists I and J, you want to search for a record containing I in column C, and change it to J (update final set c='J' where c='I').

Once it finishes the loop all should be done
 
Back
Top