Rick,
Check the usage of single quote (') in your SQL running in perl.
It could be a problem.
Yibin
Rick Windham - ISDLIS wrote:
>
> I corrected the ")" problem
>
> > Hello all,
> >
> > Here is the code snip that I'm using to insert data into Oracle:
> >
> > my $sql = qq{ insert into apache
> > $sth->execute($values[0], $values[1], $values[2],
> $values[3]) || die ("didn't insert $dbh->errstr\n")
>
> Method calls (e.g. $dbh->errstr) do not interpolate in double-quoted
> strings. Change that to either of the following:
>
> $sth->execute($values[0], $values[1], $values[2], $
Looks like a typo. See the line:
$sth->execute($values[0], $values[1], $values[2]), $values[3]|| die ("didn't insert
$dbh->errstr\n")
Only three of the values are within the ()s. Then you have a comma and another value,
and then the || die.
ltg
--
dham - ISDLIS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 08:56
Subject: Re: Still having trouble inserting date into Oracle part 2
> > Here is the code snip that I'm using to insert data into Oracle:
> >
> > my $sql = qq{ in
On Fri, Feb 01, 2002 at 11:56:45AM -0500, Rick Windham - ISDLIS wrote:
> $sth->execute($values[0], $values[1], $values[2], $values[3]) || die
>("didn't insert $dbh->errstr\n")
> ;
> $dbh->commit;
>
> I receive this error:
> didn't insert DBI::db=HASH(0x1d1990)->errstr
> Database
I corrected the ")" problem
> Hello all,
>
> Here is the code snip that I'm using to insert data into Oracle:
>
> my $sql = qq{ insert into apache_load_test(host,ident,authuser,http_date) values (?,
>?, ?,
> to_date(?,'dd/mon
> /:hh:mi:ss')) };
> my $sth = $dbh->prepare ( $sql );
> if (!$db
I think the ")" is supposed to be on the other side of $value[3]
- Original Message -
From: "Rick Windham - ISDLIS" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 10:21 AM
Subject: Still having trouble inserting date into Oracl
On Fri, Feb 01, 2002 at 11:21:49AM -0500, Rick Windham - ISDLIS wrote:
> my $sql = qq{ insert into apache_load_test(host,ident,authuser,http_date) values (?,
>?, ?,
> to_date(?,'dd/mon
> /:hh:mi:ss')) };
> my $sth = $dbh->prepare ( $sql );
> $sth->execute($values[0], $values[1], $va
Hello all,
Here is the code snip that I'm using to insert data into Oracle:
my $sql = qq{ insert into apache_load_test(host,ident,authuser,http_date) values (?,
?, ?,
to_date(?,'dd/mon
/:hh:mi:ss')) };
my $sth = $dbh->prepare ( $sql );
if (!$dbh)
{
print "error connecting; $DBI::errs