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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 select latest column in table

Author  Topic 

karthickggr88
Starting Member

1 Post

Posted - 2011-03-03 : 23:39:16
I Need latest enter amount from the table

For Eg:
Input

Sl_code amount Date
1001 1325.00 2011-02-26
1002 147177.50 2011-02-25
1003 17888.00 2011-02-23
1004 115250.00 2011-02-28


Output:

Sl_code amount Date
1004 115250.00 2011-02-28

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2011-03-04 : 00:38:04
[code]
select top 1 * from thetable order by Date desc
[/code]


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -