Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Partial phone number lookup
Message
De
23/01/2001 04:26:30
James Beerbower
James Beerbower Enterprises
Hochheim Am Main, Allemagne
 
 
À
23/01/2001 04:07:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00467158
Message ID:
00467159
Vues:
16
You really want to use a character field for telephone rather than numeric. One should only use a numeric when you plan to do calculations and why would you do math on something like a telephone number? If it was a character the solution is simple -- in the Foxworld "Dog" = "D" so if you seek "516" where the index is telephone than it will take you to the first "516". In exactly the same way
select * from telephonebook where number = substr(lcnumber,1,3)
show you all the telephone book entries with the same area code as lcNumber.

If you HAVE to use a numeric (like you plan to use logarithms on your telephone book or something) than one approach might be to have an index STR(number,7) and then seek on subst(str(lcMynumber)1,3) but really that is really silly!

>i have one table of telphone numbers having mumeric field and width 7. i have an index on it no i want to seek one value out of it which is memary variable and whose lenght is 3. whats it the way of seeking left of that perticular filed
>
>for example
>
>
>i want the telephone no starting from number 516 .
>
>what is the way.
>
>please help
>thanks in advance.
>Mohammed
James Beerbower
James Beerbower Enterprises
Frankfurt, Deutschland
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform