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

Joined: 31 Aug 2010 Posts: 1
|
Posted: Tue Aug 31, 2010 2:09 pm Post subject: Purging a List based upon another List |
|
|
Hey,
I have a database of about 1,500 products. 400 of those products belong to company1. 1,100 of those products belong to company2.
I need to separate the database so that it only shows products from company2.
Company1 gave us a XML of all their products. The database and XML have the same SKUs.
Is there a way for me to tell Calc to look at the SKU in the XML and if it finds the same SKU in the database that it should delete that row?
I have been thinking about this for about a week now and we're having a guy do this manually, but an automated way would be MUCH MUCH easier.
I thought about converting the database as well as XML into CSVs and use a shellscript to process it but I think that there is a much easier way to do it in Calc that I just don't know about.
Thanks guys. |
|
| Back to top |
|
 |
jrkrideau Super User

Joined: 08 Aug 2005 Posts: 6733 Location: Kingston ON Canada
|
Posted: Wed Sep 01, 2010 10:13 am Post subject: Re: Purging a List based upon another List |
|
|
| SirKonstantine wrote: | Hey,
I have a database of about 1,500 products. 400 of those products belong to company1. 1,100 of those products belong to company2.
I need to separate the database so that it only shows products from company2.
Company1 gave us a XML of all their products. The database and XML have the same SKUs.
Is there a way for me to tell Calc to look at the SKU in the XML and if it finds the same SKU in the database that it should delete that row?
I have been thinking about this for about a week now and we're having a guy do this manually, but an automated way would be MUCH MUCH easier.
I thought about converting the database as well as XML into CSVs and use a shellscript to process it but I think that there is a much easier way to do it in Calc that I just don't know about.
Thanks guys. |
I think I am misunderstanding the problem but...
I'm not a database user but would it not be possible to upload the xml into a data base table and just select the values that do not have the same SKU (whatever a SKU is)? _________________ jrkrideau
Kingston ON Canada
Currently using Windows 7 & OOo 3.4.0 and Ubuntu 12.04 & LibreOffice 3.5.2.2 |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
Posted: Wed Sep 01, 2010 11:47 am Post subject: |
|
|
Dealing XML (like csv) is about processing data. It is impossible to tell anything without actually seeing your data.
XML is not a file format. It is a meta file format, a convention how to build your own file formats (adding some "meaning" to your data").
Spreadsheets and databases are quite opposite to each other although both deal with tables somehow.
Getting some subset or recombination of rows is a very typical task for a database.
Database programs like MySQL can read and write XML files
and then you may use Base as a user interface for the resulting MySQL database.
http://www.kitebird.com/articles/mysql-xml.html
It is possible to import any flavour of tabular XML into Calc, but first you've got to write a special converter for your particular type of XML. For your particular task you have to master the spreadsheet tools rather proficiently to avoid errors that are impossible to do in a database.
Writing your own XML converter: http://user.services.openoffice.org/en/forum/viewtopic.php?f=45&t=3490
If I had your problem, I would search for some specialized software different from OOo or write my own XML parser outside OOo.
For an experienced programmer it would be trivial to write XML processing tools for any flavour of XML, which is the main advantage of XML. A meta file format is not intended to be used directly by the end user. _________________ Rest in peace, oooforum.org
Get help on http://forum.openoffice.org |
|
| Back to top |
|
 |
|