>>I have gone brain dead. Its only taken 55 years. I have created a table of the structure of another table. I have appended a few fields to the structure table. Now I want to create a new table with the entire new structure. I can't remember the statement syntax to do it.
>>
>>Any help will be greatly appreciated.
>>
>>Brad
>
>A few more ways:
>
>SELECT * FROM YourTable WHERE .f. INTO TABLE NewTable
>
Let's not forget
copy next 0 from yourtable to yournewtable [cdx]
>
>SELECT YourTable
>AFIELDS(laFields)
>CREATE TABLE NewTable FROM ARRAY laFields
>
>
>be careful with the last one. You cold have problems if the standard table belongs to Database but you create new one as free table.
At least I can report that the old bug was fixed (somewhere in VFP 7, 8 or 9 - haven't checked meanwhile). Up to VFP6, I think, this would error on the last line:
CREATE TABLE stuff\test_ (_fld1 c(10), _fld2 i)
AFIELDS(aa)
CREATE TABLE stuff\test_2 FROM ARRAY aa
and the error would be something about invalid or duplicate field name. The nature of the bug was that you couldn't create a field with a name beginning with an underscore FROM ARRAY. All other ways worked, just from array would cause an error. Luckily, this being Fox, anything can be done at least three ways or just isn't worth doing :).