Hi,
SQL like
select *,(select f1 from (select f1,date from table1 t1 where
t1.f1=table1.f1 order by date desc limit 1 ) t2 ) lastf1
from table1
shows table1.f1 not found, mysql 5.0.37 .
Thanks!
Shuming Wang
wang shuming wrote:
Hi,
SQL like
select *,(select f1 from (select f1,date from table1 t1 where
t1.f1=table1.f1 order by date desc limit 1 ) t2 ) lastf1
from table1
shows table1.f1 not found, mysql 5.0.37 .
Break up your query and work out which table1 it's talking about,
I suggest you simplify and use distinct aliases within your queries.
- michael
On 5/15/07, Chris [EMAIL PROTECTED] wrote:
wang shuming wrote:
Hi,
SQL like
select *,(select f1 from (select f1,date from table1 t1 where
t1.f1=table1.f1 order by date desc limit 1 ) t2 ) lastf1
Hi!
2 level derived SQL like this:
select field1,field2,(select sum(f3) from (select f3 from b1 where
b1.f2=a1.f2) a3 ) field3
from a1
SQL error, table a1 not found , that is a1.f2 not found
Regards!
Shuming Wang
Xtech Company limited
Room 29H, 29/F,Plaza 2, Tiancheng Building,No 96