| Author |
field from numeric to character
|
|
|
| How to change the type of a field from numeric to character without
changing the value of its content(field) ?
| |
|
| STR(x,l,d)
x = content of the field
l = total length of the field
d = decimal(s)
"happy" <ehab_aziz2001@yahoo.com> wrote in message
news:1116885250.301996.150430@f14g2000cwb.googlegroups.com...
> How to change the type of a field from numeric to character without
> changing the value of its content(field) ?
>
| |
| Ray Marron 2005-05-23, 8:55 pm |
| happy wrote:
> How to change the type of a field from numeric to character without
> changing the value of its content(field) ?
You can't change a DBF's structure once created. Basically, you will
have to create a new dbf with the desired structure and copy your
existing data into it, manually converting any fields that have changed
(in your case, the single numeric field) and copying those that didn't.
--
Ray Marron
| |
| Joe Wright 2005-05-24, 3:55 am |
| happy wrote:
> How to change the type of a field from numeric to character without
> changing the value of its content(field) ?
>
First, copy the .dbf to text file.
use oldb
copy to oldb deli && creates oldb.txt in delimited format
copy structure extended to estru
The file estru.dbf is a table that describes the structure of oldb.dbf
in exquisite detail. Find the numeric field entry of interest and change
its type to 'C' and decimals to 0.
create newb from estru
use newb
append from oldb deli
La voila.
--
Joe Wright mailto:joewwright@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
|
|
|
|