Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
i have a table in which i want to know the rank of each dataset..
how to achieve that.
Regards,
aashish
ok..
try this:
t1:
load * inline
[
customer,purchase
a,10
a,20
b,30
c,40
];
t2:
load *,
autonumber(purchase) as rank
resident t1
order by purchase desc;
drop table t1;
HTH
Sushil
if you are calculating in chart then you can use rank() function...
if it is in script then use autonumber to generate the ranks for each dataset..
HTH
Sushil
i want to implement it in script level...
data is like:
customer, purchase
a,10
a,20
b,30
c,40
Thanks!
Hi Aashish,
Can you please elaborate the problem... however you can try "rank" function...
Best Regards
ok..
try this:
t1:
load * inline
[
customer,purchase
a,10
a,20
b,30
c,40
];
t2:
load *,
autonumber(purchase) as rank
resident t1
order by purchase desc;
drop table t1;
HTH
Sushil
Thank you!!