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

How to INSERT from one table to another?

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


Joined: 29 Oct 2006
Posts: 1

PostPosted: Sun Oct 29, 2006 11:28 am    Post subject: How to INSERT from one table to another? Reply with quote

Greetings all!

I'm trying to insert from one table to another. Example:

INSERT INTO table_x (name)
SELECT name FROM table_y

I get a parsing error when I attempt to run.

Any help would be much appreciated.

Thanx in advance...
Back to top
View user's profile Send private message
audionuma
OOo Enthusiast
OOo Enthusiast


Joined: 23 Feb 2006
Posts: 126
Location: France

PostPosted: Sun Oct 29, 2006 9:33 pm    Post subject: Reply with quote

hello,
you have to use the Tools > SQL ... window to do that. Also, if you're using an integrated database, take care of the quoting :

Code:
INSERT INTO "table_x" ("field_name") SELECT "another_field_name" FROM "table_y"

_________________
OOo 2.3 / Mac OS PPC X.4.11
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