Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to ReRank the userRanking using the column userRank_1 via partial load. Right now the script below ranks the following. Looking for any assistance, i tried the order by but it doesnt seem to work when im using the partial load. Thank you in Advance.
Current:
userRank | userRank_1 |
2 | 2 |
3 | 3 |
4 | 4 |
5 | 1 |
Goal:
userRank | userRank_1 |
2 | 1 |
3 | 2 |
4 | 3 |
5 | 4 |
Script:
IF IsPartialReload() THEN
drop Table Dependency;
Dependency:
Replace only
LOAD
If(Len(userRank)<1, userRank, RowNo()) as userRank_1,
userRank,
Total_Score,
id,
FROM [lib://Table.qvd]
(qvd);
Store Dependency into [lib://Tablel.qvd](qvd);
ENDIF;
i think you need to sort the data to get proper ranks.
load userrank,RowNo()as userRank_1
resident table order by userrank ;
Hi Anat,
I tried sorting and using the RowNo() but it doesnt seem to sort correctly in the QVD. Essentially what i want to do is in a partial load, re-sort the ranking then provide a new ranking based on the sort and save it back into the QVD but it keeps coming out incorrect.
Andrew