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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |