List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:June 6 2003 2:04am
Subject:Re: Why is this not possible???
View as plain text  
At 14:30 +0100 6/5/03, Moj Bordel wrote:
>Hello,
>I'm not really sure (I'm by no means an expert) but
>shouldn't this be possible?
>UPDATE test set i_test=item.i_itemID WHERE
>test.i_ID=item.i_itemID;
>I'm getting this reply:
>"MySQL said:
>Unknown table 'item' in where clause"
>while of course table 'items' exists...
>I use mySQL service at my webhosting, so I don't have
>the control over the database.

No statement is possible if you use incorrect syntax. :-)

Assuming you have a version of MySQL recent enough to support
multiple-table updates, it's necessary to name all the tables before
the SET keyword.  Try:

UPDATE test, item set i_test=item.i_itemID WHERE
test.i_ID=item.i_itemID;


>
>Thanx
>
>Marc


-- 
Paul DuBois
http://www.kitebird.com/
sql, query
Thread
Why is this not possible???Moj Bordel5 Jun
  • Re: Why is this not possible???Becoming Digital5 Jun
  • Re: Why is this not possible???Paul DuBois6 Jun
    • Re: Why is this not possible???Moj Bordel6 Jun
  • Re: Why is this not possible???Kermit T. Tensmeyer6 Jun