|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Storing ranges in a table
I work for a telemarketing company. They pay their reps based on the rep's total calltimes.
I have the following payrates that I need stored in a table: Level PayRate Range 1 $6.15 1st 20 hours of dialing 2 $8.50 From 21st hour of dialing to the 90th day of dialing 3 $10 From the 91st day of dailing How can I break up the ranges into a table? I will have the rep's total calltime and based on that I need to figure out the payrate level. Thanks, Ninel |
|
#2
|
||||
|
||||
|
You could create a table with the following columns:
Level, PayRate, Min_Time Max_Time Using your example, the table might look like this (times in minutes and assumes a day as 24 hours): LEVEL PayRate Min_Time Max_Time 1 $6.15 0 1199 2 $8.50 1200 129599 3 $10.00 129600 999999999999 Whenever the total time falls between the min and max, use the payrate assigned. I hope you get some ideas. Let me know if you need more help. ![]() |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Storing ranges in a table |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|