Insert one table into another

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
scarter
Posts: 11
Joined: Sun Mar 02, 2008 4:01 pm

Insert one table into another

Post by scarter »

I'm using 2.3.1, which seems have become remarkably stable and thanks to the tips I've picked up here, versatile and useful.

I have two tables in a native (HSQL) database The first contains names, addresses, and other information. The second contains names and addresses which I successfully imported from an Excel spreadsheet. The second contains some extra information I don't need, and the field names are different. In both cases, the primary key is a value that's automatically incremented when I manually insert a record.

Question: Is it possible to insert the records from selected fields in the second table into the first? How?

Thanks.
User avatar
DrewJensen
Volunteer
Posts: 1734
Joined: Sat Oct 06, 2007 9:01 pm
Location: Cumberland, MD - USA

Re: Insert one table into another

Post by DrewJensen »

Open the Base file, switch to the Table view.
Select and copy the table you want to copy data FROM.
Click on the table you want to copy data TO
Select Paste.

The copy table wizard starts - select append data.
Follow the wizard and match up the columns you want to move, remove tick marks from the column you do not want to copy.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
scarter
Posts: 11
Joined: Sun Mar 02, 2008 4:01 pm

[SOLVED] Insert one table into another

Post by scarter »

Thanks. It worked.
OOo 3.0.X on Ms Windows XP + Ubuntu Linux, Windows Vista
Post Reply