Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing data
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00397119
Message ID:
00397144
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform