Please go read the Transact-SQL manual.

I just showed you above that you concatenate strings in SQL using the '+' operator:  select "A" + ICD_9 ...

You are at a point where you don't yet understand SQL - I strongly suggest that until you understand SQL you leave perl and DBI out of it, and write the queries that you want to execute in a text editor and run them using isql.exe or some other tool that connects directly to the database. This will give you direct feedback on what you are doing.

Are you inserting a NEW row in the ICD_9_Disease_Types table, or are you updating an existing row?

From the code above I am guessing that you are updating an existing row, in which case you need to know the relationship between the two tables.

Michael


In reply to Re: Re: Re: CONCAT Perl or SQL by mpeppler
in thread CONCAT Perl or SQL 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.