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 |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2005-08-02 : 11:10:36
|
| I have two colums, WPID and WNum. WPID is distinct, but WNum can be reapeated. For instance, I could have WPID 1-10, and each value for WNum would be 55555. What I need to do is get the maximum value for WPID associated to WNum, in this case 10.....and spin through all the records this way. I've tried (and other ways): SELECT MAX(WPID) AS Expr1, [WNum] FROM WP_General_Info GROUP BY [WNum], WPID ...but it's not working. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-02 : 11:13:53
|
| SELECT MAX(WPID) AS Expr1 FROM WP_General_Info GROUP BY [WNum] MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|