A query in my application return several columns with amounts, Now i need to add a ranking to all those columns seperatly.
So the result should be something like this:
[tt]
ID Amount1 Ranking1 Amount2 Ranking2
---- -------- --------- ------- --------
135 123.34 4 23.00 3
184 160.23 1 60.89 2
845 140.22 3 100.20 1
987 155.00 2 1.20 4
[/tt]
The ID isnt important here.
The only solution i can think of now is to create a (temp) table, populate it with the query, and then sort it for each ranking and fill the ranking one by one.
Is there a way to get the ranking filled in the same pass as the amounts are calculated?
Bascy
Software developer at
So the result should be something like this:
[tt]
ID Amount1 Ranking1 Amount2 Ranking2
---- -------- --------- ------- --------
135 123.34 4 23.00 3
184 160.23 1 60.89 2
845 140.22 3 100.20 1
987 155.00 2 1.20 4
[/tt]
The ID isnt important here.
The only solution i can think of now is to create a (temp) table, populate it with the query, and then sort it for each ranking and fill the ranking one by one.
Is there a way to get the ranking filled in the same pass as the amounts are calculated?
Bascy
Software developer at