Sorry I didn't provide code, I didn't suspect what I've now discovered: the problem occurs only with TEMPORARY tables. I'm using 3.23.42.
The following produces the error message I reported (assumes pre-existence of table 'scores'): ------------------------------------ create temporary table TT select distinct class1, dt from scores; select p.class1, p.dt from TT p inner join TT q using(class1) group by p.class1, p.dt; ------------------------------------ Remove the "temporary" and it works. ----- Original Message ----- From: "Benjamin Pflugmann" <[EMAIL PROTECTED]> To: "Uriel Wittenberg" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, November 28, 2001 8:01 AM Subject: Re: Joining table with itself > Hi. > > On Sun, Nov 25, 2001 at 11:32:15PM +0800, [EMAIL PROTECTED] wrote: > > I tried: > > > > select ... from T1 a inner join T1 b using(...); > > > > and it doesn't work. I get a message about "Can't reopen table: 'a' ". > > I cannot reproduce this: > > mysql> SELECT count(*) FROM config a INNER JOIN config b USING (gid) WHERE a.gid=10856; > +----------+ > | count(*) | > +----------+ > | 1 | > +----------+ > 1 row in set (0.00 sec) > > mysql> SELECT version(); > +-------------+ > | version() | > +-------------+ > | 3.23.42-log | > +-------------+ > 1 row in set (0.00 sec) > > Bye, > > Benjamin. > > > > Is this not something that belongs in section "1.4.4 Functionality > > Missing from MySQL" of the manual? > [...] > > -- > [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