Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
OOPs,
I guess I should have viewed the whole thread before answering (the problem with being behind a couple days). On the other hand, I guess we just validated each other.
Rick
>>hi all:
>>
>>I was wondering if there is a command or some code that I can use to add fields into an existing table.
>>
>>
>>thanks.
>
>Just a stab ... this is pseudocode you would have to look up the syntax:
>
>Select *, ;
> (value) as < < new field name > >, ;
> (value) as < < new field name 2 > > ;
> from oldtable ;
> into table newtable
>
>close data all
>rename oldtable to < < backup name > > && you can never be too safe
>rename newtable to oldtable
>use newtable (using oldtable name) in select(0)
>index on ... tag ... , etc.
>
>In the above, the values in the select statement should be the correct type and picture for the new fields:
>0000000.00 for a numeric -- just adjust the value to the size you want,
>space(10) for a character -- adjust the number of spaces for the size
>.t. for a logical, etc.
>
>HTH
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement