CipherTeKST
3/20/2007 8:54:00 PM
Well I have a table that looks similar to...
Initials Name Field3 Field4 Money
aaa A aaa aaa 1000.00
bbb B bbb bbb 350.00
ccc C ccc ccc 2500.00
ddd D ddd ddd 5500.00
etc. etc. etc.
But I want to select all these fields with a rank for the 6th field, but
since i have more than 100 records in the table the rank goes higher than
100. Is there a max number we can put on the rank and have everything under 1
to have a rank of 0.
Thanks!
--
CipherTeKST
MCSE: Security 2003, CCNA, Security+
"Alejandro Mesa" wrote:
> Can you post some DDL, sample data and expected result?
>
> Thanks,
>
> AMB
>
> "CipherTeKST" wrote:
>
> > I have a table with 121 rows, 5 columns; last column being a currency value.
> > How can I rank from the currency value with the max rank being 100, with
> > every record below 1 ranking as 0. I have tried DENSE_RANK() OVER(Order by
> > CurrencyValue ASC) but I get the max currency value as 110 and every record
> > that is 0 in the currency value tied at 1. I need the max currency value to
> > be 100 and everything below rank 1 to be 0.
> >
> > Any help will be greatly appreciated, Thanks.
> > --
> > CipherTeKST
> > MCSE: Security 2003, CCNA, Security+