Re: [libreoffice-users] [Base} Compare contents of similar records on two sheets

2012-04-12 Thread Mark Stanton
Both of these will be easy to do as a query in Base, although the 
first is a little tedious, provided that you can get both tables into 
the same database.

Something along the lines of

SELECT * FROM 
JOIN  ON Master.IdField = Month.IdField
WHERE   Master.Column1 <> Monthly.Column1
OR  Master.Column2 <> Monthly.Column2
OR ... (The rest of the fields)

If you can't get both into the same database, don't use the embedded 
database (though you wouldn't anyway, would you? ;-) ), And bring 
them into separate databases and then perform that SQL using the data 
engine itself, ie not through Base, even if you use Base to get the 
data there in the first place.

For any database worth its salt 2000 records is tiny.

For records in one but not in the other

SELECT * FROM 
WHERE IdField NOT IN (SELECT IdField FROM )

And then do it the other way around.

Regards
Mark Stanton
One small step for mankind...



-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
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] [Base} Compare contents of similar records on two sheets

2012-04-12 Thread Preston Smith

Hello,

I have asked this question previously in the context of two spreadsheets.

I know now that I can migrate my spreadsheets to BASE and with minimal 
fuss make it work for me.


I have two sets of records.  My Master database and a monthly update 
that reflects additions, deletions and changes accumulated by another 
party over the past month along with unchanged records from the previous 
month.


I need to compare the two sets of information to update my Master file 
which is more comprehensive then the monthly update. I do not want to 
make these comparisons manually - there are in excess of 2000 records in 
each file.


Each record is of the format
Field 1. Master Number (assigned by another agency)
Fields 2-30. Various data formats

If a record, as determined by the Master Number field, exists on both 
sheet 1 and sheet 2, I would like to be able to compare the similar 
fields, field by field.  If the field contents of one record are not 
identical to the corresponding field in the similar record in the other 
file, I would like to be able to have this record brought to my 
attention with anomalies highlighted


If a record, as determined by its Master Number, is in one sheet and not 
in the other I would like this anomaly brought to my attention also


Is there a way that this can be done?

Thanks,
Preston



--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
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