LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-17-2008, 11:24 AM   #1
hpladd
Member
 
Registered: Feb 2003
Distribution: Kubuntu
Posts: 142

Rep: Reputation: 15
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 ||
-----------------------------------------------------------------
 
Old 10-18-2008, 10:07 AM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
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.

Last edited by bigrigdriver; 10-18-2008 at 10:12 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i copt the MYSQL Database to a other server (Database) halvorls Linux - Server 3 07-27-2008 10:19 PM
Database importation/conversion? frankkky Programming 1 07-02-2007 03:00 AM
Spreadsheet to Database conversion debiant Linux - Enterprise 1 05-31-2007 12:45 PM
Database Programming (database to database transaction) johncsl82 Programming 7 02-02-2007 09:20 AM
LXer: A database solution is more than database software LXer Syndicated Linux News 0 09-25-2006 09:54 AM


All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration