Help constructing query - Compare columns and replace numbers
Posted
by Tommy
on Stack Overflow
See other posts from Stack Overflow
or by Tommy
Published on 2010-03-18T15:14:19Z
Indexed on
2010/03/18
15:21 UTC
Read the original article
Hit count: 166
I have a feeling that this query is pretty easy to construct, I just can't figure it out.
I want to replace all numbers in table X column C, with numbers in table Z column A, where numbers from table X column C matches numbers in table Z column B.
I hope that makes sense. Perhaps a little background information will make it clearer. I've converted from one CMS to another, and the module I used to convert mapped the ids to the new database. Table X column A is the new id's. Table X column B is the old id's. Table Z is the table for an image gallery that I migrated, and column C contains the id's of the images owners.
Can anyone crack this nut?
© Stack Overflow or respective owner