Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matrix
Message
 
À
20/06/1999 16:17:08
Dovi Gilberd
Dovtware Consulting Inc
Miami, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Matrix
Divers
Thread ID:
00231940
Message ID:
00231950
Vues:
15
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform