LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Database Conversion (https://www.linuxquestions.org/questions/linux-newbie-8/database-conversion-677105/)

hpladd 10-17-2008 10:24 AM

Database Conversion
 
I'd like to convert a database that was created with a Windows application into a database that is usable by OpenOffice Base.

I can import the tables into OObase; however, I am having difficulty performing queries as the last column is a comma separated list of keywords.

I tried to depict a sample of the tables below. The tables have three columns: file #, section label, keywords.

Must I "normalize" the comma separated list of keywords by giving each keyword its own column, or is it possible to construct a query that parses through the comma separated list of keywords?

Quote:

-----------------------------------------------------------------
|| file # || section label || keywords ||
-----------------------------------------------------------------
|| 1 || house projects || windows,paint exterior,paint||
|| 2 || house projects || dining room,sandpaper ||
-----------------------------------------------------------------
|| 1 || finance || tax,2004,irs,state, ||
|| 2 || finance || tax, 2005,irs,state, ||
|| 3 || finance || tax,2006,irs,state, ||
|| 4 || finance || tax,2007,irs,state ||
-----------------------------------------------------------------

bigrigdriver 10-18-2008 09:07 AM

The comma-delimited list shouldn't stop a properly written query. However, it does complicate things a bit.

Since the db isn't normalized, you could specify the position in the field at which the search term is located (position at beginning, end, entire field, anywhere in field), or just do it the easy way and bracket the search term with asterisks (search for *2005*, for example).

In re converting Access db to OpenOffice db, try exporting the Access db to a delimited text file. Create the db in OOo Base, then import the text file to fill the Base db.

A word of caution: since you have a field with comma-delimited values, use some other delimiter in the exported text file, such as forward or backward slash, hyphen, anything other than comma.


All times are GMT -5. The time now is 09:52 AM.