| View previous topic :: View next topic |
| Author |
Message |
DJKeegs Newbie

Joined: 29 Oct 2006 Posts: 1
|
Posted: Sun Oct 29, 2006 11:28 am Post subject: How to INSERT from one table to another? |
|
|
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 |
|
 |
audionuma OOo Enthusiast


Joined: 23 Feb 2006 Posts: 126 Location: France
|
Posted: Sun Oct 29, 2006 9:33 pm Post subject: |
|
|
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 |
|
 |
|