OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Switching on Auto Value in a Table

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
MHB
General User
General User


Joined: 19 Mar 2009
Posts: 12

PostPosted: Wed Apr 01, 2009 3:38 am    Post subject: Switching on Auto Value in a Table Reply with quote

Hi again,

I ran into a new problem. After merging my tables by the Base to Calc to Base method the newly created one doesn't have the Auto Value on with the primary key. Is it possible to turn on Auto Value in an existing table?

Any help appreciated.

rk
Back to top
View user's profile Send private message
Villeroy
Super User
Super User


Joined: 04 Oct 2004
Posts: 10065
Location: Germany

PostPosted: Wed Apr 01, 2009 4:01 am    Post subject: Reply with quote

It is possible, but may be very tricky due to the existing tables without enforced integrity (spreadsheets don't enforce anything).

Do it agian with a new auto-ID generated by the import wizard.
Then run an UPDATE query to replace the old spreadsheet-IDs with the new IDs (UPDATE "Table" ... SET ("T1"."ID"="T2"."Auto_ID") WHERE "T1"."ID"="T2"."oldSheetID" or something along this line)

If you are familiar with spreadsheets, it may be easier for you to generate consistent IDs in the spreadsheet by means of match-formulas and row numbers before exporting. (meanwhile I prefer UPDATEs into new fields to rebuild relations)
_________________
Rest in peace, oooforum.org
Get help on http://forum.openoffice.org
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group