Anything similar to DENSE_RANK() in Oracle

Database
KVB
Enthusiast

Anything similar to DENSE_RANK() in Oracle

Hi

I am using TD 13.I have a scenario where I need to represent dates to a sequence.And I have multiple id's for the same date.Each date i would like to represnt a single number only.

It canbe done using DENSE_RANK() INoracle or TD14.But How cani achieve it in TD 13.

Example data:

empno doj   rank

1          current_date  1

2         current_date    1

3          current_date    1

4          current_date+1   2

5         current_date+1     2

Regards

KVB

2 REPLIES
Enthusiast

Re: Anything similar to DENSE_RANK() in Oracle

KVB,

you can install the dense_rank UDF on your system.

Robert

Enthusiast

Re: Anything similar to DENSE_RANK() in Oracle

Hi,

Teradata has rank function. All you need to do is tweak with a self  join and rank.

I think Dieter has worked it out. Re-inventing the wheel????

http://developer.teradata.com/blog/dnoeth/2011/05/missing-functions-dense-rank

Thanks and regards,

Raja