DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   MS SQL (http://www.daniweb.com/forums/forum127.html)
-   -   joining the table (http://www.daniweb.com/forums/thread201313.html)

manojjena1982 Jul 2nd, 2009 3:59 pm
joining the table
 
I have a table name Project(id,projectid,date)
-----------------------------------------------------------
id | projectid | date
1 | 9 | 2009-02-03
2 | 9 | 2009-03-04
3 | 9 | 2009-04-05

i need a query which will return me the recent date of that project id.
query will return:
3 | 9| 2009-04-05

cgyrob Jul 2nd, 2009 4:44 pm
Re: joining the table
 
Try something like

Select Top 1 from Project order by date desc


All times are GMT -4. The time now is 3:02 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC