>Hello,
>
>Is there a way to insert a field into an existing table? I do not mean appending a field with: "ALTER TABLE xx ADD COLUMN yy"
>
>With "MODIFY STRUCTURE" you do can insert a field, but I need to do it with code, could anybody please help me out?
>
>Thanx in advance
>Ron
The built-in command ALTER TABLE ... ADD COLUMN adds the column at the end. There is no built-in BEFORE FieldX or AFTER Fieldx clause.
As a workaround, you can create a new table and APPEND FROM (see also: COPY STRUCTURE EXTENDED).
When I modify my structures, I do the changes manually (i.e., in the table designer), and use a program to APPEND FROM for modified tables. For production data, this program is run at midnight.
HTH, Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)