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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-23 : 08:52:42
|
| Rupert writes "Hi,I have a SQL question hope you can help me.I have a table that look like this:id name version01 xx 101 xx 202 yy 103 zz 203 zz 3I want to see the ids with the max version only, like this:id name version01 xx 202 yy 103 zz 3How can I wwrite the SELECT statement to do that? (there are many ids, so I can't use where id='1')Thanks,Rupert" |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-05-23 : 08:59:02
|
| Select Id,Name,Max(Version)As Version From TableName Group by ID,NameIf Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
|
|
|