You are here: Re: SQL with greatest date « MsSQL Server « IT news, forums, messages
Re: SQL with greatest date

Posted by BB on 11/07/06 17:31

thanks, that worked great

"Anith Sen" <anith@bizdatasolutions.com> wrote in message
news:eiqeuf$1vd8$1@news.ndhu.edu.tw...
> There are different ways you can do this. One option is to use a
> correlated subquery as an additional SQL predicate in the WHERE clause
> like:
>
> ...
> WHERE a.location_id = b.location_id
> AND b.meterno IS NOT NULL
> AND b.meterno = c.meterno
> AND a.location_id = d.location_id
> AND d.creation_date = ( SELECT MAX( d2.creation_date )
> FROM cisdata.Account_Master d2
> WHERE a.location_id = d2.location_id )
> ORDER BY ...
>
> --
> Anith
>

 

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

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