Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matrix
Message
 
 
To
20/06/1999 16:17:08
Dovi Gilberd
Dovtware Consulting Inc
Miami, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Matrix
Miscellaneous
Thread ID:
00231940
Message ID:
00231950
Views:
14
>i have a question: can anybody help me:
>i have a matrix that goes like this
>
>country_code + country + rate1 + rate2 + rate3
>01157 Colombia 0.23 0.24 0.19
>01158 Costa Rica 0.27 0.26 0.11
> . .
> . .
> . .
> n n countries
>
>
>the client has a preset rete of "rate3", he makes a call tothis number 0115758340625?
>the question is what do i need to do to compare the first six digits of the call to determine the country code and then the country and the rate...can anybody help me do that...

To get the first six digits of the the telephone number, do this (assuming the phone number is numeric and of non-fixed length):
* convert to string, get first 6 characters, then convert to an integer
nCountryCode = int(val(substr(str(1234567890),1,6)))

You would then select the code from your rate table above with some code similar to:

select country, rate from country_table where country_table.countrycode = nCountryCode
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform