List:General Discussion« Previous MessageNext Message »
From:Fred Read Date:April 29 1999 10:47am
Subject:Re: Select most recent row - another one for the FAQ perhaps?
View as plain text  
Robin Bowes wrote:
> 
> Fred Read wrote:
> >     "How do I return the most recent row for a given xxx?"
> 
> Try
> 
>      select
>          UserName, Created, Latest
>      from
>          MyTable
>      where
>          Latest = max(Latest);
>      and
>          UserName = 'MyUserName'

That couldn't work because Latest is not a column [see table 
definition] it is an alias for a calculated value [see SQL]. 
-- 

If it ain't opinionated, it ain't Rich Teer.
Thread
Select most recent row - another one for the FAQ perhaps?Fred Read29 Apr
  • Re: Select most recent row - another one for the FAQ perhaps?Robin Bowes29 Apr
  • Re: Select most recent row - another one for the FAQ perhaps?Fred Read29 Apr
  • Re: Select most recent row - another one for the FAQ perhaps?Robin Bowes29 Apr
  • Re: Select most recent row - another one for the FAQ perhaps?Christian Mack29 Apr
    • Re: Select most recent row - another one for the FAQ perhaps?Fraser MacKenzie29 Apr
      • Re: Select most recent row - another one for the FAQ perhaps?Fred Read29 Apr
        • Select most recent row - another one for the FAQ perhaps?Fraser MacKenzie29 Apr
    • Re: Select most recent row - another one for the FAQ perhaps?Erik Liljencrantz29 Apr
  • Re: Select most recent row - another one for the FAQ perhaps?Fred Read29 Apr
    • Re: Select most recent row - another one for the FAQ perhaps?Michael Longval1 May
      • Re: Select most recent row - another one for the FAQ perhaps?Thimble Smith1 May
  • Re: Select most recent row - another one for the FAQ perhaps?Robin Bowes29 Apr
    • Re: Select most recent row - another one for the FAQ perhaps?Erik Liljencrantz29 Apr
      • Re: Select most recent row - another one for the FAQ perhaps?Michael Widenius30 Apr