>>Are you saying that depending on which date range is being searched, a different table name and schema should be used? thank you for the reply

Yes exactly, it will most often be multiple tables selected from, not just one. Somtimes it will be multiple years (schemas)

>>If so, load them all up as separate Class::DBI classes and choose which one to run the search against in your CGI.

Well they'll likely be searching a range not a singular date. Find transactions from Dec 3 2006 -> jan 3 2007 where this this and this but not this. etc Off the cuff sql like:

(select date, conn_id, cust_id from 2007.jan_trans where date in ( '20 +07-1-3' ) and cust_id=3) UNION ALL (select date, conn_id, cust_id from 2006.dec_trans where date in ( '20 +06-12-3') and cust_id=3 )

And actually more often it will probably be about 1-6 month ranges.

So that's what I'm struggling to figure out how to do in Class::DBI. I'm trying to avoid all the normal manual sql work etc.

thanks


In reply to Re^2: Class::DBI and data split multiple tables by kor
in thread Class::DBI and data split multiple tables by kor

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.