Big Help Needed 
Author Message
 Big Help Needed

I've got 3 tables holding the following info.

TBLCountry
Fields
Destination
Subdestination
PrimaryKey (Destination&Subdestination)
Prefix

TBLRates
Carrier
PrimaryKey (Destination&Subdestination)
RatePPMPeak
RatePPMOffPeak
RatePPMWeekend
RateEffectiveDate

TBLCallDataRecords
Carrier
PhoneNumber
Date
Time
Duration
Cost

What I need to do is check the cost of the call from the tBLCallDataRecords
with
the details in the other two tables

Example

Record in TBLCallDataRecords
Carrier    PhoneNumber         Date          Time     Duration     Cost
BT          001947658465       01/01/01   09:30    00:04:35     0.5635

What i need to do is find a record in the TBLRates that matches Carrier,
Finds the correct prefix by removing digits from right to left until it
finds a match
Checks to see what day the date falls on (this will specify if the Rate used
is Weekend) and
What Rate to find due to the Effective Date
If not Weekend check if the Call is in Peak or Off Peak

It should find the following Record

Carrier   DestinationSubDestination     RatePPMPeak        RatePPMOffPeak
RatePPMWeekend    EffectiveDate
BT         USAUSA                             0.0625
0.0325                       0.0215                      23/12/00

Now I need to calulate the actual cost of the call
Duration(Converted to seconds) times RatePPMPeak(Converted to Cost Per
Second) = Actual Cost

I hope this makes sense, thanks for your help.
Geoff



Mon, 30 Aug 2004 17:56:53 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Big Help needed

2. Big Help Needed

3. Big Help needed for Sequence

4. compact pst file ? (big help needed)

5. Help!!! BIG HELP NEEDED!

6. Help!!! BIG HELP NEEDED!

7. Need big help for big problem

8. {Need Help Big Project Need Help}

9. newbie needs big help

10. Newbie needs Big Time Help!!!

11. NEED BIG HELP !! with small prob ,,,,

12. I need big time help with graphics

 

 
Powered by phpBB® Forum Software