Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing data
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00397119
Message ID:
00397144
Vues:
10
>I have a couple of questions. I am importing call detail records into a foxpro table. The fields are destination phone number, originating phone number, and minutes for each call.
>The problem is that the phone numbers do not have dashes in them, which i need. Is there anyway to insert dashes after the data is already in the table? I tried using the input mask (set to 999-999-9999), and it put in dashes, but cut off digits.
>The other problem is that the minutes in the call detail record are in a format where a decimal is assumed (example 14 would be 1.4 minutes). Is there a way I can change all of them once they are in a foxpro table so they show the decimal? Maybe like multiply all records in the minutes field by .1 ?
>
>Thank you,
>Ryan

In addition to what Trey said, these fall in the category of VFP's million and one ways to do most anything:

replace myfield with transform(myfield,"@R 999-999-9999")
replace myfield with substr(myfield,1,3)+'-'+substr(myfield,4,3)+'-'+substr(myfield,7)
replace myfield with left(myfield,3)+'-'+substr(myfield,4,3)+'-'+right(myfield,4)

Personally, I like option 1.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform