# Bad experience with Open Source... OOo

**URL:** https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266
**Category:** Miscellaneous and Personal Stuff I Must Share
**Created:** [March 28, 2006, 5:13pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266 "2006-03-28T17:13:06Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)
#### Post date: [March 28, 2006, 5:13pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/1 "2006-03-28T17:13:06Z")

</div>

Just had to rant. The [OpenOffice.org](http://OpenOffice.org) “database” solution is really a piece of crap. Let’s put aside the crashing for now, and deal with the functionality.

Now, I need to use Access for a little side project of my own. I have a fixed width text file that I need to work with. Now that I’m not working in an office any more, I don’t have Access to Access (ha) but I know that it would work suitably for my needs, and Excel won’t cut the mustard, mostly because of the number of records (more than 65k) and also because I don’t need that much processing.

So I hunt around. What’s that new buzzword, Open Source? Hey, it’s free, might as well give it a try…

1. I can’t import fixed width tables.
2. I read the help file. It tells me to open then using the \*.csv filter. Fine.
3. There’s no such filter.
4. I get pissed, read the help file again, google around… nothing. Find that damn \*.csv filter  
4a) Follow someone’s advice to just drag and drop. Up comes the silly \*.csv filterless dialog. :rolleyes:
5. I look again. It’s not FRICKIN THERE
6. Simmer for a bit, wonder if perhaps the filters were in another module that I didn’t install
7. Install the whole damn thing.
8. Suddenly, the \*.csv filter is there. Okay, fine.
9. Attempt to import. And what do I find?

THE NUMBER OF RECORDS IS LIMITED TO 65K!! DAMMIT!! THIS IS A FRAKING DATABASE PROGRAM HERE!!! WTF!!!

Now, I’m going to install mySQL on my computer, and access it from my computer through 127.0.0.1 (more rolleyes here) and hopefully it has something that can import fixed width tables.

GRRrrrrrrrrrrrrrrrrrrrrrrrrrr.

---

<div class="post-metadata">

### Author: ![Terminus\_Est](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/terminus_est/32/3087_2.png) [@Terminus\_Est](https://boards.straightdope.com/u/Terminus_Est)
#### Post date: [March 28, 2006, 6:09pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/2 "2006-03-28T18:09:49Z")

</div>

I got bad news for you: mySQL is open source, too. 😉

---

<div class="post-metadata">

### Author: ![ddgryphon](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@ddgryphon](https://boards.straightdope.com/u/ddgryphon)
#### Post date: [March 28, 2006, 6:11pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/3 "2006-03-28T18:11:44Z")

</div>

> [@Tabby\_Cat](#):
>
> Just had to rant. The [OpenOffice.org](http://OpenOffice.org) “database” solution is really a piece of crap. Let’s put aside the crashing for now, and deal with the functionality.
> 
> Now, I need to use Access for a little side project of my own. I have a fixed width text file that I need to work with. Now that I’m not working in an office any more, I don’t have Access to Access (ha) but I know that it would work suitably for my needs, and Excel won’t cut the mustard, mostly because of the number of records (more than 65k) and also because I don’t need that much processing.
> 
> So I hunt around. What’s that new buzzword, Open Source? Hey, it’s free, might as well give it a try…
> 
> 1. I can’t import fixed width tables.
> 2. I read the help file. It tells me to open then using the \*.csv filter. Fine.
> 3. There’s no such filter.
> 4. I get pissed, read the help file again, google around… nothing. Find that damn \*.csv filter  
> 4a) Follow someone’s advice to just drag and drop. Up comes the silly \*.csv filterless dialog. :rolleyes:
> 5. I look again. It’s not FRICKIN THERE
> 6. Simmer for a bit, wonder if perhaps the filters were in another module that I didn’t install
> 7. Install the whole damn thing.
> 8. Suddenly, the \*.csv filter is there. Okay, fine.
> 9. Attempt to import. And what do I find?
> 
> THE NUMBER OF RECORDS IS LIMITED TO 65K!! DAMMIT!! THIS IS A FRAKING DATABASE PROGRAM HERE!!! WTF!!!
> 
> Now, I’m going to install mySQL on my computer, and access it from my computer through 127.0.0.1 (more rolleyes here) and hopefully it has something that can import fixed width tables.
> 
> GRRrrrrrrrrrrrrrrrrrrrrrrrrrr.

uh. . .Doesn’t this belong somewhere else?

That being said, I think that and the power point programs are the weakest links in Open Office.

---

<div class="post-metadata">

### Author: ![Squee](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Squee](https://boards.straightdope.com/u/Squee)
#### Post date: [March 28, 2006, 7:03pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/4 "2006-03-28T19:03:05Z")

</div>

> [@Terminus Est](#):
>
> I got bad news for you: mySQL is open source, too. 😉

mySQL is a POS.

Use Postgres, or either of the free “express” editions of Oracle or SQL Server instead. 🙂

---

<div class="post-metadata">

### Author: ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)
#### Post date: [March 28, 2006, 7:03pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/5 "2006-03-28T19:03:39Z")

</div>

I dunno, I thought it was pretty mild for the pit… and anyway, CS deals with computery things, right?

In any case, mySQL sorta worked… it’s just that I seem to have fogotten all my SQL. 😛 And dear GOD if there’s any way they could make it less user unfriendly I’m glad they haven’t found it yet. Oh, for the ease of simply of making update queries and select queries and defining your own functions using VBScript…

Sigh. _goes and checks Ebay_

I may have to deal with this by splitting the file into 3 excel spreadsheets or something…

---

<div class="post-metadata">

### Author: ![LiveOnAPlane](https://avatars.discourse-cdn.com/v4/letter/l/3d9bf3/32.png) [@LiveOnAPlane](https://boards.straightdope.com/u/LiveOnAPlane)
#### Post date: [March 28, 2006, 11:10pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/6 "2006-03-28T23:10:10Z")

</div>

OK, this may be a little bit from way left field.

I give you lots of caveats.

First, a few years ago, I downloaded Oracle 9i to my personal computer, free of charge. Caveat 1, I haven’t done any RDBMS downloads fromt hem since, so I don’t know if the program is still in effect. But, for personal use, it was free. No charge.

Takes up a lot of space, but works like a dream for me.

Caveat 2, it is a full-fledged RDMBS, and you need to know the basics of database administration even if it is single-user.

Caveat 3, it is NOT for commercial use, for that you will need to buy it. But for personal use, you’re OK.

Caveat 4, I don’t think you can get the front end tools like Oracle Forms and ORacle Reports for free, you just get the database and use SQL.

Again, I emphasize, I don’t know if you can still do this, OR what tools you can also get with it. But you might think about investigating this.

See if SQL\*Loader is available, since you want to import tables from ??? (some other source). I don’t know how much this impacts your situation or if it might not even be worth it.

---

<div class="post-metadata">

### Author: ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)
#### Post date: [March 28, 2006, 11:13pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/7 "2006-03-28T23:13:27Z")

</div>

PostgreSQL

---

<div class="post-metadata">

### Author: ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)
#### Post date: [March 29, 2006, 1:44am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/8 "2006-03-29T01:44:50Z")

</div>

Hmm… maybe a little explaination of what I’m intending to do…

I’ve got a fixed width table in plaintext form, with many many many lines that look like this.

```auto

0 XAM POS 357.170349 11.582619 1483.619019
0 XAM PYR 0.234 -2.041445 0
25 20 POS 698.834351 9.465625 1774.984375
33 8 PYR 0 1.278561 0

```

The first number is the number of milliseconds after the last entry something happened, that is, the change in time since the last event.

That’s not very useful, so I need to add a field to it, make a “time index” by summing up all the deltas up to that point. And I completely have no idea about how to go about doing this in raw SQL. 😛

---

<div class="post-metadata">

### Author: ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)
#### Post date: [March 29, 2006, 1:59am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/9 "2006-03-29T01:59:12Z")

</div>

SELECT SUM(field) AS total FROM mytable

Or something like that. I haven’t done databases for a couple of years now. There should be a SUM function (or ADD maybe) if you look through the reference, so from there it’s a matter of figuring out where in the query it goes.

If you have Perl, you could just write a script like:

```auto

open(IN, "<filename.txt") or die "Can't open in file!/n";

$val = 0;
while (<IN>) {
   if (/^(\d+) .*/) {
      $val += $1;
   }
}

print $val;

```

Not tested so I doubt the above works correctly.

---

<div class="post-metadata">

### Author: ![Tabby\_Cat](https://avatars.discourse-cdn.com/v4/letter/t/6a8cbe/32.png) [@Tabby\_Cat](https://boards.straightdope.com/u/Tabby_Cat)
#### Post date: [March 29, 2006, 2:21am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/10 "2006-03-29T02:21:12Z")

</div>

Wouldn’t that return the sum of all the timedeltas? I don’t want the sum of all deltas, I only want the sum of all deltas up to that point… now, it’s just saying

“30ms after the last command, this command.”  
“12ms after the last command, this command.”  
“13ms after the last command, this command.”

I want to sum it such that it will give me (equivalent to the above)

“20000ms after the start, this command”  
“20012ms after the start, this command”  
“20025ms after the start, this command”

Something like… er…

UPDATE table SET table.timeindex = (SUM (SELECT timedelta FROM table WHERE primarykey \< table.primarykey)); (Yes, that’s syntactically wrong, but I hope it gives the idea of what I’m trying to do)

Hmm… actually, now, come to think of it, perhaps if I had 2 seperate tables, it might work… Hmmm…

---

<div class="post-metadata">

### Author: ![Manduck](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/manduck/32/256_2.png) [@Manduck](https://boards.straightdope.com/u/Manduck)
#### Post date: [March 29, 2006, 2:44am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/11 "2006-03-29T02:44:31Z")

</div>

What you are trying to do kind of cuts against the grain of a relational database, where a table is considered to be an unordered collection of rows, so I doubt if it can be done with plain SQL. You could do it procedurally, though, but at the least you will have to specify in what order you want to process the rows.

---

<div class="post-metadata">

### Author: ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)
#### Post date: [March 29, 2006, 2:48am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/12 "2006-03-29T02:48:52Z")

</div>

> [@Tabby\_Cat](#):
>
> Hmm… maybe a little explaination of what I’m intending to do…
> 
> I’ve got a fixed width table in plaintext form, with many many many lines that look like this.
> 
> ```auto
> 
> 0 XAM POS 357.170349 11.582619 1483.619019
> 0 XAM PYR 0.234 -2.041445 0
> 25 20 POS 698.834351 9.465625 1774.984375
> 33 8 PYR 0 1.278561 0
> 
> ```
> 
> The first number is the number of milliseconds after the last entry something happened, that is, the change in time since the last event.
> 
> That’s not very useful, so I need to add a field to it, make a “time index” by summing up all the deltas up to that point. And I completely have no idea about how to go about doing this in raw SQL. 😛

Similar to what **Sage Rat** said, but this problem can be solved with a perl one-liner:

perl -ne ‘/^(\d+) /; $total += $1; s/^(\d+) /$total /; print;’ input.txt

---

<div class="post-metadata">

### Author: ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)
#### Post date: [March 29, 2006, 2:58am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/13 "2006-03-29T02:58:08Z")

</div>

Ah… Well you would need to do something like:

UPDATE mytable SET time=(  
SELECT SUM(delta) FROM mytable WHERE item\<X  
) WHERE item=X

in a loop where you increment X by one for each row in the table. But if you’re doing this at the command line that may be difficult. MySQL probably allows for some sort of scripting language to be run against it, which would allow you to use a loop. But I’m not sure what that is.

Again, you could use Perl. The following should add the new field at the end of the line.

```auto

open(IN, "<filename.txt") or die "Can't open in file!
";
open(OUT, ">outfile.txt") or die "Can't open out file
";

$val = 0;
while (<IN>) {
   if (/^(\d+)(.*)/) {
      print OUT "$1$2	" . $val . "
";
      $val += $1;
   }
}

```

Again, this probably needs to be debugged.

---

<div class="post-metadata">

### Author: ![Sage\_Rat](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/sage_rat/32/399_2.png) [@Sage\_Rat](https://boards.straightdope.com/u/Sage_Rat)
#### Post date: [March 29, 2006, 3:02am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/14 "2006-03-29T03:02:06Z")

</div>

> [@Polerius](#):
>
> Similar to what **Sage Rat** said, but this problem can be solved with a perl one-liner:
> 
> perl -ne ‘/^(\d+) /; $total += $1; s/^(\d+) /$total /; print;’ input.txt

That’s four lines. You just put them on one. 😛

How is that iterating all the lines? (I never tried figuring out how to do command-line apps so there may be some rule you’re using.)

---

<div class="post-metadata">

### Author: ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)
#### Post date: [March 29, 2006, 3:10am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/15 "2006-03-29T03:10:45Z")

</div>

> [@Sage Rat](#):
>
> How is that iterating all the lines? (I never tried figuring out how to do command-line apps so there may be some rule you’re using.)

It’s the ‘n’ in the ‘-ne’ command-line switch.

From [here](http://www.cs.cf.ac.uk/Dave/PERL/node164.html#SECTION001832000000000000000)  
we see:

> [@](#):
>
> The -n option causes Perl to execute your script inside the following loop:
> 
> while (\<\>) {
> 
> ```
> # your script
> 
> ```
> 
> }
> 
> The -p option uses the same loop, but adds a continue block so that $\_ will be printed every time through the loop. If both -n and -p are specified on the command line, the -p option will take precedence. The loop looks like this:
> 
> while (\<\>) {
> 
> ```
> # your script
> 
> ```
> 
> } continue {
> 
> ```
> print;
> 
> ```
> 
> }

So, actually, I could have made my one-liner shorter by using

perl -pe ‘/^(\d+) /; $total += $1; s/^(\d+) /$total /;’ input.txt

---

<div class="post-metadata">

### Author: ![Polerius](https://avatars.discourse-cdn.com/v4/letter/p/d78d45/32.png) [@Polerius](https://boards.straightdope.com/u/Polerius)
#### Post date: [March 29, 2006, 3:21am UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/16 "2006-03-29T03:21:57Z")

</div>

> [@Sage Rat](#):
>
> That’s four lines. You just put them on one. 😛

OK, poking around a little more, I have made it into a one-statementer 😛

perl -pe ‘s/^(\d+) /{$total+=$1} /e;’ input.txt

---

<div class="post-metadata">

### Author: ![SkipMagic](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/skipmagic/32/20706_2.png) [@SkipMagic](https://boards.straightdope.com/u/SkipMagic)
#### Post date: [March 29, 2006, 2:47pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/17 "2006-03-29T14:47:36Z")

</div>

I think this best fits MPSIMS. Off ya’ go!

---

<div class="post-metadata">

### Author: ![Crowbar\_of\_Irony\_3](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@Crowbar\_of\_Irony\_3](https://boards.straightdope.com/u/Crowbar_of_Irony_3)
#### Post date: [March 29, 2006, 3:34pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/18 "2006-03-29T15:34:14Z")

</div>

> [@Tabby\_Cat](#):
>
> I dunno, I thought it was pretty mild for the pit… and anyway, CS deals with computery things, right?
> 
> In any case, mySQL sorta worked… it’s just that I seem to have fogotten all my SQL. 😛 And dear GOD if there’s any way they could make it less user unfriendly I’m glad they haven’t found it yet.

I myself find MySQL unusable without the aid of [phpMyAdmin](http://www.phpmyadmin.com/). Unfortunately, you need PHP first. I recalled that there was some client frontend for mySQL – I used those (which are rather sucky) before using phpMyAdmin.

---

<div class="post-metadata">

### Author: ![Crowbar\_of\_Irony\_3](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@Crowbar\_of\_Irony\_3](https://boards.straightdope.com/u/Crowbar_of_Irony_3)
#### Post date: [March 29, 2006, 3:36pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/19 "2006-03-29T15:36:52Z")

</div>

Darn - the link to phpMyAdmin shall be [http://www.phpmyadmin.net/](http://www.phpmyadmin.net/)  
Apologies.

---

<div class="post-metadata">

### Author: ![UncleRojelio](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/unclerojelio/32/3160_2.png) [@UncleRojelio](https://boards.straightdope.com/u/UncleRojelio)
#### Post date: [March 29, 2006, 3:46pm UTC](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266/20 "2006-03-29T15:46:33Z")

</div>

> [@Polerius](#):
>
> perl -pe ‘s/^(\d+) /{$total+=$1} /e;’ input.txt

PERL; you just gotta hate it.

[Next page](https://boards.straightdope.com/t/bad-experience-with-open-source-ooo/350266.md?page=2)
