Let me explain in clearer English. I have a list of all the disease codes. I wish to go down this list and take each code one by one. I want to know what disease categories each element of this list falls into. The user sets the code ranges for the disease categories and this information is held within the second table. Each row of the second table represents a range. Therefore, in this second table, a single disease category may be represented on more than one row.

I need a lookup table so that all the ICD codes for a particular disease can be lookup with a simple statement and this is why I wish to create the third table.

I don’t know whether this can be done with a series of SQL statements or whether Perl DBI could be used. I was assuming that Perl or equivalent should be used. I see no reason why this question should not be posted here.


In reply to Re: Re: OT: Creating tables from others by Win
in thread OT: Creating tables from others by Win

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.