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 |
thendraljazz
Starting Member
26 Posts |
Posted - 2011-12-07 : 00:29:25
|
Hi I have data based on updated date in the table.so now i need to get last 3 updated dates which is having records in table.How can i do this..give me a solution... |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2011-12-07 : 00:32:41
|
[code]select top 3 *from yourtableorder by update_date desc[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-07 : 00:40:09
|
[code]select top 3 with ties *from yourtableorder by update_date desc[/code]in case you've multiple records within last 3 update dates and have to retrieve all of them------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|