!!!Complicated calculation!!
I have an ADO recordset which holding data from a table. I have 2 more table table named RANGE and GRADE.
Now what I want is:
1. Pick up a field name from ado record set
2. Find the that field name in RANGE table record
3. If found do some calculate and you get a point
4. Compare the calculated point with point(UL/LL) in GRADE table
5. If point found in GRADE table pick up the grade
6. Repeat step 1 to 5 for each field names in ado record set
Here are tables:
Ado Recordset holding records which has:
2002 2003
NIM 14.5 21.55
ROAA 55.12 56.45
ROAE 32.15 45.95
RANGE Table:
Name Wieghtage UL LL Point
NIM 20% 20.00 4.75 1
NIM 20% 4.74 4.00 2
ROAA 30% 100.00 4.75 1
ROAE 30% 4.74 4.00 2
ROAE 30% 3.99 3.25 3
and......
GRADE Table:
Grade LL UL
AAA 1.00 1.49
AA+ 1.50 1.83
AA 1.84 2.16
AA- 2.17 2.49
and ......
Calculation Example at step 3
If ADO's NIM value is 10.5 then POINT from RANGE table will be 1
(1-(10.5-4.75)/20.00-4.75)*20/100
OR
(range.point-(ado's nim value -range.LL)/(range.UL-range.LL))*range.weighate/100
Any help?
Thanks

