Copy record

Creating tables and queries
Post Reply
hornetster
Posts: 9
Joined: Fri Jan 18, 2008 4:21 am

Copy record

Post by hornetster »

I am rather a newbie here, (databases in general - openbase & mysql...) I have a database (mySQL with an ODBC connection - Windows server 2003) that imports information into a table on a semi regular basis. I know that when it is imported, a small number (20 or so) will always have a couple of the fields incorrect. I have edited the initial import, so the records are correct, and copied to another table.
Is there a way to copy a whole record from one table, to overwrite a record in another table? Initially looking at doing this manually, but perhaps then creating a macro to do it.
At the moment, I cannot find a way to copy a whole record - using the copy option in openbase just seems to copy the currently selected field, even if the whole record is selected.....
User avatar
r4zoli
Volunteer
Posts: 2882
Joined: Mon Nov 19, 2007 8:23 pm
Location: Budapest, Hungary

Re: Copy record

Post by r4zoli »

I cannot answer your really question. I know that connecting to MySQL with 3.5.1 ODBC driver not so stable, as 5.1 ODBC, I suggest use JDBC driver instead.
AOO 4.0 and LibO 4 on Win 8
Hungarian forum co-admin
QuazzieEvil
Volunteer
Posts: 283
Joined: Tue Dec 04, 2007 6:38 pm
Location: Houston, TX

Re: Copy record

Post by QuazzieEvil »

you can do it with the rowset service. I have some docs at http://www.geocities.com/rbenitez22 that show you how to use the row set serivce.

Also, I believe there is an example in the code snipets sub forum that does exactly that--you may want to look at the also/first-->
http://user.services.openoffice.org/en/ ... =45&t=1169

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

Re: Copy record

Post by DrewJensen »

Also by using using standard SQL commands either in the SQL window or in a script.
Former member of The Document Foundation
Former member of Apache OpenOffice PMC
LibreOffice on Ubuntu 18.04
Post Reply