You are here: Selecting records by date - need a little help « MsSQL Server « IT news, forums, messages
Selecting records by date - need a little help

Posted by CK on 09/26/56 11:42

Good Morning,
I have a view that contains rate information, contractIDs, and effective
dates.
I need to select the rate info based on contractID and date.
I can provide a date and contractID, and I need to select the rate info for
that contract where the effective date is <= dateprovided.

I need the 1 record that is closest to that date.

I am thinking something with max() perhaps. Any ideas? The <= effective
date will return several rows, I just need the one closest to the date I
provide.

Thanks for any advice,
CK

 

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

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