Well, I would say kowtow towards the error message and admit to yourself you may have an error in your SQL syntax. Denial is the first stage! Looks like you are missing parenthesis?

In general, RTFM if you get into trouble. Type SQL INSERT INTO at Google and click I'm feeling lucky. You are also still not using prepare and execute properly IMO like they are meant to be used (and are described in the manual).

# For example: my $sql = "insert into lookup (SYS_ACC,REPORT_NAME,JOB_NAME) values (? +,?,?)"; my $sth = $dbh->prepare($sql) or die $dbh->errstr; $sth->execute($sys_acc, $report, $job) or die $sth->errstr #update: fo +rgot error check # Easier to read and how it was intended.

Or you could use do:

my $countofrowsaffected = $dbh->do($sql, undef, $sys_acc, $report, $jo +b) or die $dbh->errstr;

I tend to test SQL statements on their own outside of perl before I put them in code. I use mysql's command line client but there are many alternatives.


In reply to Re^2: need to access a remote server to move the files around in a set folder there by juster
in thread need to access a remote server to move the files around in a set folder there by smanicka

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.