How to get the recently added date in sql

Posted by Raja_89 under ASP.NET on 4/20/2013 | Points: 10 | Views : 843 | Status : [Member] | Replies : 1
Hai
Is it possible to disaplay a values

2013-03-28 15:00:23.703
2013-03-28 15:03:17.770
2013-03-28 15:04:47.863
2013-03-28 15:05:29.250
2013-04-05 11:00:37.163
2013-04-05 16:54:01.957
2013-04-05 16:57:23.610
2013-04-06 17:42:49.843
2013-04-08 14:08:40.103
2013-04-08 14:10:10.110
2013-04-08 14:10:18.873
2013-04-05 16:57:55.297
2013-04-05 16:57:59.110
2013-04-08 14:14:13.583
2013-04-08 14:14:25.500
2013-04-08 14:23:57.530
2013-04-08 15:12:44.903
2013-04-08 15:22:03.580
2013-04-08 16:40:05.867
2013-04-15 14:14:48.133
2013-04-15 14:15:01.513
2013-04-16 13:23:31.310
2013-04-16 13:59:28.180
2013-04-16 13:59:50.770
2012-04-12 00:00:00.000
2013-04-17 11:21:25.767
2013-04-19 12:12:42.147
2013-04-19 12:21:53.000
2013-04-20 10:25:45.113


In above records is it possible to show only 5 recent added record in ascending order

I tried
but it returns top 10



Regards




Responses

Posted by: Jayakumars on: 4/20/2013 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this

Select Row_number() over(order by DateId) ,DateAdd from Tbl_NewDate where DateId in(1,2,3,4,5)

Mark as Answer if its helpful to you

Raja_89, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response