Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tracmonali
Starting Member
16 Posts |
Posted - 2012-05-14 : 17:28:27
|
hello,with table col as follows, col1 col2 col3Name1 addr1 11/11/2005Name2 addr2 12/2/2005name3 addr3 2/15/2006Name4 addr4 3/28/2006Name5 addr5 6/6/2010now if @myvar = 03/01/2006, it should ignore all values greater than @myvar (aka 3/28/2006 and 6/6/2010) but pick up max of the values lesser than @myvar (11/11/2005, 12/2/2005, 2/15/2006). so output after comparing should pick up 2/15/2006. thanks. |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
|
|
|
|