Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating new fields on an existing table via code
Message
 
 
To
09/07/2001 15:23:48
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00528301
Message ID:
00528308
Views:
17
>Hello,
>
>Currently we are using the ALTER TABLE command to add new fields to existing tables.
>
>These new fields always append to the bottom of the tables.
>
>What command can we use to move these new fields to somewhere other than the bottom of the tables? Say, if we wanted to move them to the middle?
>
>Thanks!
>Joeeeeeeeee

Hi Joe,
Using simple SQL commands, you can't. SDT has this functionality built in. You can check out their website. This and many other functions make this a must have (IMO).

If you want to roll your own for this, you have to rename the table. Create an array with the current structure using AFIELDS. Insert array rows/columns into your array using AINS(). Then create a new table using the array (i.e. create table NewTable from array MyArray) and then append your information from the old table to the new one.

Good luck!
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform