You are here: Re: problem with Select query « MsSQL Server « IT news, forums, messages
Re: problem with Select query

Posted by CK on 10/22/75 11:32

Would this only give the the value of max ID as a result? I think Sandy
wants the complete row which has the max ID value.


"Jens" <Jens@sqlserver2005.de> wrote in message
news:1132566796.857987.84390@g49g2000cwa.googlegroups.com...
> This could be a solution:
>
>
> Select MAX(ID) FROM SomeTable
> Where Time =
> (
> Select MAX(Time) From SomeTable
> )
>
> You were missing the aliases:
>
>
> select max(ID) from
> (
> select * from A where time in
> (
> select max(time) from A
> ) SubQuery1
> ) SubQuery2
>
>
> HTH, Jens Suessmeyer.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация