If I was going the view route, there is no need to use MySQL.

But that said, views are an alternative to consider. Unfortunately I've already encountered cases where PostgreSQL chooses bad query plans, and so I need to create a temporary table then query it. That is not something that I can do in a view. I've also encountered cases where it is easier to do some simple calculations outside of the database. (Example: what is the spread from one event to another in months? The catch is that if the first event happened Jan 31, and the second one Feb 2, the spread is 1 month. That kind of date arithmetic is very messy in SQL.)

In fact both of these happened on the very data set that I'd like to be able to pull into Excel. :-(

Now there is another workaround, and that is to create stored procedures in the database and select from that. I have reasons for not doing that as well, but if I can't make an intermediate layer work then I'd seriously consider going there.


In reply to Re^2: Excel automatically pulling data from Perl? by tilly
in thread Excel automatically pulling data from Perl? by tilly

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.