Re: Still having trouble inserting date into Oracle part 2

2002-02-01 Thread Yibin Dong
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

RE: Still having trouble inserting date into Oracle part 2

2002-02-01 Thread James.FitzGibbon
> > $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], $

Re: Still having trouble inserting date into Oracle

2002-02-01 Thread Laurie Gennari
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 --

Re: Still having trouble inserting date into Oracle part 2

2002-02-01 Thread Michael A Chase
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

Re: Still having trouble inserting date into Oracle part 2

2002-02-01 Thread Ronald J Kimball
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

Re: Still having trouble inserting date into Oracle part 2

2002-02-01 Thread Rick Windham - ISDLIS
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

Re: Still having trouble inserting date into Oracle

2002-02-01 Thread Jay Strauss
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

Re: Still having trouble inserting date into Oracle

2002-02-01 Thread Ronald J Kimball
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

Still having trouble inserting date into Oracle

2002-02-01 Thread Rick Windham - ISDLIS
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