oanion
IS-IT--Management
- Jun 18, 2004
- 55
Good Afternoon All,
I'm trying to create a formula that will rank records based on one field, however, I'm not sure how to get started. I did a little research and found out that rank is a function that can be used if there was an OLAP database, however, I using ODBC to connect to a SQL Server 2000 database. For instace, if I have the following database records:
Client Payments Ranking
001 $7,881,370.46 2
003 $1,190.00 5
004 $56,698,177.44 1
005 $3,944,003.27 3
006 $341,016.69 4
I want the records to be soreted in the order of the client, however, I want the ranking to be calculated based on the amount of the payment WITHOUT sorting the clients. Please remember that the number records can easily go over 500. Therefore, I wouldn't be able to do a simple if statement. I know I need a loop, however, I'm not sure how to develop it.
If you have any ideas. PLEASE HELP!!! or point me in the right direction
I'm trying to create a formula that will rank records based on one field, however, I'm not sure how to get started. I did a little research and found out that rank is a function that can be used if there was an OLAP database, however, I using ODBC to connect to a SQL Server 2000 database. For instace, if I have the following database records:
Client Payments Ranking
001 $7,881,370.46 2
003 $1,190.00 5
004 $56,698,177.44 1
005 $3,944,003.27 3
006 $341,016.69 4
I want the records to be soreted in the order of the client, however, I want the ranking to be calculated based on the amount of the payment WITHOUT sorting the clients. Please remember that the number records can easily go over 500. Therefore, I wouldn't be able to do a simple if statement. I know I need a loop, however, I'm not sure how to develop it.
If you have any ideas. PLEASE HELP!!! or point me in the right direction