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 |
|
kkiranvr
Yak Posting Veteran
54 Posts |
Posted - 2010-05-13 : 18:00:40
|
| Here is the scenario, id value 1 3001 400 (max value for id -=1)2 500 (max value for id = 2)2 2992 300I want o/p as id value1 4002 500Explanation: I want to get the max(calue) from the table who is having the same id. Thanks Chinna. -Thanks N Regards,Chinna. |
|
|
singularity
Posting Yak Master
153 Posts |
Posted - 2010-05-13 : 18:22:29
|
| [code]select id, max(value) as valuefrom yourtablegroup by id[/code] |
 |
|
|
|
|
|