worldpeace
MIS
I have a table with these fields:
Deptcode ID QTY Rank
-------- --- ---- ----
10 11 150 NULL
10 12 270 NULL
10 10 75 NULL
10 14 175 NULL
20 22 400 NULL
20 23 100 NULL
20 28 130 NULL
20 29 40 NULL
10 16 275 NULL
and want to make the table look like this
Deptcode ID QTY Rank
-------- --- ---- ----
10 16 275 1
10 12 270 2
10 14 175 3
10 11 150 4
10 10 75 5
20 22 400 1
20 28 130 2
20 23 100 3
20 29 40 4
Thanks for helps
Deptcode ID QTY Rank
-------- --- ---- ----
10 11 150 NULL
10 12 270 NULL
10 10 75 NULL
10 14 175 NULL
20 22 400 NULL
20 23 100 NULL
20 28 130 NULL
20 29 40 NULL
10 16 275 NULL
and want to make the table look like this
Deptcode ID QTY Rank
-------- --- ---- ----
10 16 275 1
10 12 270 2
10 14 175 3
10 11 150 4
10 10 75 5
20 22 400 1
20 28 130 2
20 23 100 3
20 29 40 4
Thanks for helps