You are here: Re: SQL query question « MsSQL Server « IT news, forums, messages
Re: SQL query question

Posted by GTi on 11/01/05 11:41

David Portas wrote:
> > The table is sorted by timestamp
> That's not correct. Tables are always unsorted.
>
> Try:
>
> SELECT idd
> FROM datetable
> WHERE startdate =
> (SELECT MAX(startdate)
> FROM datetable
> WHERE startdate <= '2005-01-01T02:35:00') ;
>
> --
> David Portas
> SQL Server MVP
> --

David is my hero!


And for my typo:
The correct closest idd (less or equal to 2005/01/01 14:00) is 122223
at 2005/01/01 10:19.

 

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

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