Aha, much appreciated...your words "therefore the target table may not 
appear in the SELECT clause" have made it clear to me...but can I assume 
that if I was to use aliases, then I would be able to sneak past this 
problem? :)

John :^)
 


Benjamin Pflugmann wrote:

> Hi.
>
> As is described somewhere ( http://www.mysql.com/doc/R/E/REPLACE.html ),
> REPLACE mainly behaves like INSERT and therefore the target table may
> not appear in the SELECT clause (as described here:
> http://www.mysql.com/doc/I/N/INSERT_SELECT.html ).
>
> Sorry, but it seems you have to use a temporary table to store the
> intermediate result.
>
> Bye,
>
>         Benjamin.
>
> On Tue, Oct 02, 2001 at 12:39:18PM +1000, [EMAIL PROTECTED] wrote:
> > Hi,
> >
> > When I try and use the REPLACE function such as:
> >
> > REPLACE INTO table1 SELECT table2.ID, table2.Modified FROM table1 
> INNER JOIN table2 ON table1.Company=table2.Company;
> >
> > I get:
> >
> > ERROR 1066: Not unique table/alias: 'table1'
> [...]
>
> -- 
> [EMAIL PROTECTED]
>



---------------------------------------------------------------------
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

Reply via email to