Hi all,
I have a pretty complex query going on...

In 'transfertable' we have oldid and newid. The old id's are mapped to new id's.

In table2 we have the id.

To make things more interesting, the id isn't a primary key in table2,
the primary key consists of 3 fields...

We need to adjust table2 so that every id (which is the old id) is
replaced with the newid according to 'transfertable'.


I've been trying to do this, but I'm hitting the limits of my mysql
wizardry.. any suggestions? I don't think we can just do

update table2 set id = select newid from transfertable where oldid =
id (that wouldn't work anyways?)

I'm stuck, any help is very welcome!

Thanks!
Peter

--
Find 10000s of videoblogs and podcasts at http://mefeedia.com
my blog: http://poorbuthappy.com/ease/
my job: http://petervandijck.net

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to