bobo123
Programmer
- Oct 4, 2002
- 30
I have problems with using temporary table in SELECTs, where is tmptable JOINed more then once.
F.e.:
CREATE TEMPORARY table tmptbl SELECT * from basetable
Next is O.K.:
select * from table1
left join tmptbl tmp1 on table1.a1=tmp1.a
order by ...
Next gives me an error:
select * from table1
left join tmptbl tmp1 on table1.a1=tmp1.a
left join tmptbl tmp2 on table1.a2=tmp2.a
order by ...
With standard (non temporary table) are BOTH examples OK.
Please any experience, contribution ??
Thanks a lot
Nikos
nikosx@email.cz
F.e.:
CREATE TEMPORARY table tmptbl SELECT * from basetable
Next is O.K.:
select * from table1
left join tmptbl tmp1 on table1.a1=tmp1.a
order by ...
Next gives me an error:
select * from table1
left join tmptbl tmp1 on table1.a1=tmp1.a
left join tmptbl tmp2 on table1.a2=tmp2.a
order by ...
With standard (non temporary table) are BOTH examples OK.
Please any experience, contribution ??
Thanks a lot
Nikos
nikosx@email.cz