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 Oracle > 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 > /yyyy:hh:mi:ss')) }; > my $sth = $dbh->prepare ( $sql ); > if (!$dbh) > { > print "error connecting; $DBI::errstr\n"; > } > else > { > open (EP,"/accounts/rickw/Dec2001access_log"); > #open (EP,"/u01/ias/ias10201/Apache/Apache/logs/Dec2001access_log"); > while (<EP>) > { > chomp; > s/\[//g; > s/\]//g; > s/"//g; > my @values = split (/ /,$_); > print "ip address $values[0] $values[1] $values[2] $values[3]\n"; > $sth->execute($values[0], $values[1], $values[2]), $values[3]|| die ("didn't insert > $dbh->errstr\n") > ; > $dbh->commit; > > I receive this error: > > execute called with 3 bind variables when 4 are needed at apache_slice_up.pl line 25, <EP> line 1. > Database handle destroyed without explicit disconnect, <EP> line 1. > > > Sample data from the open file where the data comes from: > > 191.9.453.334 - - [12/Dec/2001:14:42:08 -0500] "GET /Safety/codeforce/ArtWork/addl_off.gif HTTP/1.1" > 304 - > 191.9.453.433 - - [12/Dec/2001:14:42:08 -0500] "GET /Safety/codeforce/ArtWork/corr_on.gif HTTP/1.1" > 304 - > 191.9.453.354 - - [12/Dec/2001:14:42:08 -0500] "GET /Safety/codeforce/ArtWork/corr_off.gif HTTP/1.1" > 304 - > 191.9.453.234 - - [12/Dec/2001:14:42:08 -0500] "GET /Safety/codeforce/ArtWork/inre_on.gif HTTP/1.1" > 304 - > > Any help please.. > > Thanks > > rickw > > > > -- > =============================== > Rick Windham | > DATABASE ADMINISTRATOR | > MANATEE COUNTY GOVERNMENT ISD | > 941-749-3075 | > 941-749-3086 (fax) | > [EMAIL PROTECTED] | > =============================== > > > _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com