hi I need to read a table with 94 columns and write back to another table. I am using fetchrow_array to read and the write is:
my $sql = qq(INSERT INTO table VALUES ( $array[0], $array[1], $array[2], $array[3], $array[4],$arr +ay[5], $array[6], $array[7], $array[8], $array[9],$array[10],$arr +ay[11],$array[12], $array[13],$array[14],$array[15],$array[16],$array[17],$ar +ray[18], $array[19],$array[20],$array[21],$array[22],$array[23],$ar +ray[24], $array[25],$array[26],$array[27],$array[28],$array[29],$ar +ray[30], $array[31],$array[32],$array[33],$array[34],$array[35],$ar +ray[36], $array[37],$array[38],$array[39],$array[40],$array[41],$ar +ray[42],$array[43], $array[44],$array[45],$array[46],$array[47],$array[48],$ar +ray[49],$array[50], $array[51],$array[52],$array[53],$array[54],$array[55],$ar +ray[56],$array[57], $array[58],$array[59],$array[60],$array[61],$array[62],$ar +ray[63],$array[64], $array[65],$array[66],$array[67],$array[68],$array[69],$ar +ray[70], $array[71],$array[72],$array[73],$array[74],$array[75],$ar +ray[76], $array[77],$array[78],$array[79],$array[80],$array[81],$ar +ray[82], $array[83],$array[84],$array[85],$array[86],$array[87],$ar +ray[88], $array[89],$array[90],$array[91],$array[92],$array[93] )); my $sth = $dbh_1->prepare($sql) or die "fail to prepare sql statement. +...$!\n"; $sth->execute() or die "cannot execute...$!";
I know this is extremely inefficient but I can't get it right using placeholders

In reply to dbi placeholders by fionbarr

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.