hi,
I have a table:
TaskID URLID Order Total
1 731951 NULL 100
1 731952 NULL 10
1 731953 NULL 9
2 1 NULL 100
2 2 NULL 10
2 3 NULL 9
I want to update the Order column so that it looks at the total counts and gives a grading by TaskID. so the highest total per taskId would be 1, the 2nd highest total per Task Id would be 2 and so on. There will be more than 3 per TaskID however. So it would look like the below.
TaskID URLID Order Total
1 731951 1 100
1 731952 2 10
1 731953 3 9
2 1 1 100
2 2 2 10
2 3 3 9
do I need a cursor for this?
Thanks
I have a table:
TaskID URLID Order Total
1 731951 NULL 100
1 731952 NULL 10
1 731953 NULL 9
2 1 NULL 100
2 2 NULL 10
2 3 NULL 9
I want to update the Order column so that it looks at the total counts and gives a grading by TaskID. so the highest total per taskId would be 1, the 2nd highest total per Task Id would be 2 and so on. There will be more than 3 per TaskID however. So it would look like the below.
TaskID URLID Order Total
1 731951 1 100
1 731952 2 10
1 731953 3 9
2 1 1 100
2 2 2 10
2 3 3 9
do I need a cursor for this?
Thanks