[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libreoffice-users] Re: I have a question
- Subject: Re: [libreoffice-users] Re: I have a question
- From: Jay Lozier <email@example.com>
- Date: Sat, 28 Jul 2012 17:36:14 -0400
- To: firstname.lastname@example.org
On 07/28/2012 03:42 PM, Lynne Stevens wrote:
*Oh yeah both files are CVS and are the way Thomas downloads them but being he is not to computer literate and most likely does not know he can save it in different ways . . No telling . . I ask one time and he said that is how it gets downloaded
What I think you are doing is loading two tables from csv files into the *same* database. With databases one finds there is a fairly precise terminology used. Once you have the data loaded then on can query the data. The tables do not need to have the same structure only be related in some logical manner.
If I understand the project you download a CSV file with addresses that has many duplicates of data in a table in the database. The next step is find only those addresses that are not duplicates so they can be appended to the existing table.
If you upload the new data into a table (Temp) you can then write a query to find new/updated entries in the existing table (Addresses).
Roughly the query would look something like this
SELECT relevant columns from Temp, each column listed in the following format t.columnname
FROM Temp AS t, Addresses AS a (using an alias you do not need to type the full table name)
WHERE t.columnname != a.columnname - more than one criteria can be used such as customer name, address, city, phone number, etc to identify the duplicates.
For the WHERE clause I would look for some unique id used in the data sets, such as a customer number.
On 07/28/2012 09:39 AM, Alexander Thurgood wrote:
Le 28/07/12 14:17, Lynne Stevens a écrit :
*How do I check for duplicates in a data base using another data base ?By "another data base", do you mean :
(a) another ODB file ?
(b) another type of database manager, e.g. Access vs Calc, or MySQL vs
Access, or even Access vs Access ?
(c) another table in the same ODB file or in the same database schema
managed by a unique database manager ?
(d) any or all of the above combined ?
As you can see, the possibilities belie what would appear to be a
seemingly simple question.
Andreas has answered (c) for you, i.e. where both tables are in the same
There is no simple way to compare the contents of 2 HSQLDB/ODB files,
other than extracting the contents from one and importing it into the
other as a temporary or new table and then comparing the table results
from within the single ODB file using a JOIN query.
As for (b) LO Base does not allow you to adress two separate database
schema as far as I know from within a single query. I heard tell once
that it might be possible with Access tables being read by LO if an ODBC
connection was being used, and this only would work on Windows. Not
having tried it, I can't say whether it is true or not.
If what you are aiming for is indeed cross-schema queries in order to be
able to compare, this has been a requested (and never implemented)
feature in OpenOffice.org for many years.
For unsubscribe instructions e-mail to: email@example.com
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
|[libreoffice-users] I have a question||Lynne Stevens <firstname.lastname@example.org>|
|[libreoffice-users] Re: I have a question||Alexander Thurgood <email@example.com>|
|Re: [libreoffice-users] Re: I have a question||Lynne Stevens <firstname.lastname@example.org>|
- Prev by Date: Re: [libreoffice-users] Re: I have a question
- Next by Date: Re: [libreoffice-users] Other SQL question as it affects Base
- Previous by thread: Re: [libreoffice-users] Re: I have a question
- Next by thread: [libreoffice-users] pdf creation issue on a single file?