When doing a cumulation:
select d1.n, d1.cnt, sum(d2.cnt*d2.n) as cum
from distro d1, distro d2
where d1.n >= d2.n
group by d1.n, d1.cnt
order by d1.n;
this works fine if distro is an ordinary table, but not if distro is a
TEMPORARY one. In that case, I get a message
Can't reopen table: 'd1'
which is not very helpful, and in the case of the not entirely trivial query
above, leads one to you waste a lot of time trying to get the query right.
There may be special limitations on TEMPORARY tables, but this should either
work, or fail with a proper error message.
(This is MySQL 3.23.25-beta, on Tru64 Unix).
With kind regards,
Philip
--
Why don't Alice and Bob simply get married?
-----------------------------------------------------------------------------
Philip Lijnzaad, lijnzaad@stripped \ European Bioinformatics Institute,rm A2-08
+44 (0)1223 49 4639 / Wellcome Trust Genome Campus, Hinxton
+44 (0)1223 49 4468 (fax) \ Cambridgeshire CB10 1SD, GREAT BRITAIN
PGP fingerprint: E1 03 BF 80 94 61 B6 FC 50 3D 1F 64 40 75 FB 53