List:General Discussion« Previous MessageNext Message »
From:Michael Dykman Date:May 15 2007 5:39pm
Subject:Re: table not found
View as plain text  
I suggest you simplify and use distinct aliases within your queries.

 - michael

On 5/15/07, Chris <dmagick@stripped> 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
> >           from table1
> >
> >  shows table1.f1 not found,  mysql 5.0.37 .
>
> Break up your query and work out which table1 it's talking about, ie:
>
>
> select f1,date from table1 t1 where t1.f1=table1.f1 order by date desc
> limit 1
>
> (I assume that will work)
>
> Then
>
> select  f1 from (select f1,date from table1 t1 where t1.f1=table1.f1
> order by date desc limit 1 )  t2
>
>
> Then everything together - which ones work and which ones break ?
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>


-- 
 - michael dykman
 - mdykman@stripped

 - All models are wrong.  Some models are useful.
Thread
table not foundwang shuming15 May
  • Re: table not foundChris15 May
    • Re: table not foundMichael Dykman15 May