>Hi.
>
>On Thu, Jan 18, 2001 at 05:39:25PM -0500, [EMAIL PROTECTED] wrote:
> >
> > How can I do the following:
> >
> > update location set location.city_id = location_city.city_id where
> > location.city = location_city.name;
> >
> > I want to update one field in a table with values from another table. Is
> > this possible within MySQL or do I need to write some code to do this.
>
>It is not yet possible (but planned for 4.0), so you have to write
>some work-around for it.
Sir, for a possible work-around, go to my website at
http://users.starpower.net/rjhalljr. Click on MySQL on the side bar,
and then click on MySQL SQL. Look for the Update using other tables
topic in the Strictly SQL section. You will have to insert the data
into a temp table, and then REPLACE from the temp table.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php