Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Numeric to character
Message
From
14/07/2000 14:32:40
 
 
To
14/07/2000 14:17:37
Tina Levensky
Siegfried, Crandall, Vos & Lewis, P.C.
Kalamazoo, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00392581
Message ID:
00392590
Views:
8
>What is the syntax to change a numeric field to a character field without losing the data? Alter table...

If you want the new character field to have the same name as the old numeric field you have to go through a couple of gyrations:

1. Add a character field to the table e.g. CharTemp
2. Open the table, issue
REPLACE ALL CharTemp WITH STR(NumericField)
3. Delete the original numeric field.
4. Rename the CharTemp field to the name of the numeric field.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform