|
Posted by stassaf on 07/03/06 13:20
Hi All,
I'm using the sample table:
ID | CODE | V1 | V2 | V3
----------------------------------------------------------------
1 3 10 3 43
1 4 9 8 22
1 2 6 2 55
1 5 57 12 6
I want to get for a given ID the MAX(V1), MAX(V2), MAX(V3)
and their respective CODEs.
For the above table the returned record for ID=1 should be:
v1=57, v2=12, v3=55, code_v1=5, code_v2=5, code_v3=2
currently I've got a very messy solution, I'm
looking for an elegant way to do this.
10x,
Assaf.
[Back to original message]
|