Code Comments
Programming Forum and web based access to our favorite programming groups.How to change the type of a field from numeric to character without changing the value of its content(field) ?
Post Follow-up to this messageSTR(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) ? >
Post Follow-up to this messagehappy 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
Post Follow-up to this messagehappy 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 ---
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.