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 |
airdos
Starting Member
1 Post |
Posted - 2010-09-03 : 14:47:46
|
Hello, Here is what I need to do but I am running into a problem.TableID SUBID YEAR DESC1 1 2010 Test12 1 2008 Test23 2 2010 Test34 2 2008 Test4I would like to select the max(SubID) and max(Year) at the same time but carry over the Desc and ID. The tables I am working with are a lot larger and have many more columns (joined) I need to carry through to the result. Results:ID SUBID YEAR DESC1 1 2010 Test13 2 2010 Test3Any help would be appreciated. |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2010-09-03 : 20:14:22
|
try with a co-related sub query.. post what you have and we can help...Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
|
|