943,694 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 421
  • MS SQL RSS
Jul 2nd, 2009
0

joining the table

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
manojjena1982 is offline Offline
22 posts
since Jan 2009
Jul 2nd, 2009
0

Re: joining the table

Try something like

SQL Syntax (Toggle Plain Text)
  1. SELECT Top 1 FROM Project ORDER BY DATE desc
Reputation Points: 91
Solved Threads: 18
Junior Poster
cgyrob is offline Offline
125 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: How to combine multiple rows's column into one column
Next Thread in MS SQL Forum Timeline: String or binary data would be truncated.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC