[Tutorial] Reorder Table Columns using the Base GUI

Forum rules
No question in this forum please
For any question related to a topic, create a new thread in the relevant section.

[Tutorial] Reorder Table Columns using the Base GUI

Postby DACM » Wed Dec 22, 2010 4:08 am

The following method utilizes the Base GUI to reorder Table columns/fields. These steps apply to the default "Embedded database" utilizing the "HSQL database engine" as reflected in the Base status bar. Additional steps or workarounds may be necessary with non-embedded (external/existing/split) databases. Either way, this is not the expert approved method so backup your .odb file before proceeding.

Reorder_Columns_02.jpg
Right-click on the Table and select 'Copy'

Reorder_Columns_03.jpg
Right-click 'Paste' a new Table

Reorder_Columns_04.jpg
In the Copy table dialog, rename the Table and ensure 'Definition and data' is selected, then click 'Next'
Last edited by DACM on Mon Feb 11, 2013 6:56 pm, edited 7 times in total.
User avatar
DACM
Volunteer
 
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Continued...

Postby DACM » Wed Dec 22, 2010 4:14 am

Reorder_Columns_05.jpg
Reorder columns by individual selection, leaving the left panel blank, and click 'Create'

Reorder_Columns_24.jpg
Verify the new Table and data!!! Then re-work any global relationships before deleting the original table...

Reorder_Columns_20.jpg
Click the 'Add Table' icon
Last edited by DACM on Wed Jan 05, 2011 7:15 am, edited 3 times in total.
User avatar
DACM
Volunteer
 
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Continued...

Postby DACM » Wed Dec 22, 2010 4:25 am

Reorder_Columns_21.jpg
Add the new Table to the Relationships window

Reorder_Columns_22.jpg
Create the same relationships in the new Table, mirroring those of the original Table

Reorder_Columns_23.jpg
Right-click each relationship in the original Table and 'Delete'
User avatar
DACM
Volunteer
 
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

Continued...

Postby DACM » Wed Dec 22, 2010 5:18 am

Reorder_Columns_08.jpg
Again, after verifying the new Table and data, right-click 'Delete' the original

Reorder_Columns_09.jpg
Right-click 'Rename' the new Table (or re-accomplish the Table copy process above to rename non-embedded database Tables; or perhaps use Tools > SQL... to Execute: ALTER TABLE "OldName" RENAME TO "NewName")

Reorder_Columns_11.jpg
Use the original Table name for compatibility with existing work (Queries, etc.)
Last edited by DACM on Thu Mar 15, 2012 12:01 pm, edited 2 times in total.
User avatar
DACM
Volunteer
 
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am

And finally...

Postby DACM » Wed Dec 22, 2010 5:26 am

Reorder_Columns_13.jpg
Reclaim the original database file size using SQL, click Tools > SQL...

Reorder_Columns_14.jpg
Type CHECKPOINT DEFRAG, then click 'Execute' ...and you're done!!!
User avatar
DACM
Volunteer
 
Posts: 1138
Joined: Tue Nov 03, 2009 7:24 am


Return to Base

Who is online

Users browsing this forum: No registered users and 2 guests