See my previous note, and if you look at the trace output you will see the problem of how the to_date is bounded:-)
Ilya > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On > Behalf Of Stacy Mader > Sent: Saturday, November 03, 2001 12:12 AM > To: Terrence Brannon > Cc: dbi-users > Subject: Re: Quoting with placeholders > > > Okay, > > $dbh->do(qq{ > INSERT INTO $fault_db ( > FAULT_NO, > REPORTED_BY, > PROJECT_NO, > DATE_OCCURRED, > DATE_REPORTED, > TIME_LOST, > ONE_LINE_SUMMARY, > ISSUE, > NEW_REPORT, > ALLOCATED_TO > ) > VALUES (?,?,?,?,?,?,?,?,?,?) > }, undef, > $fault_no, > $reported_by, > $project_no, > $date_occurred, > $date_reported, > $time_lost, > $one_line_summary, > $issue, > 'Y', > 'NOT YET ALLOCATED' > ); > > Even after defining all columns, I still get the error: > > DBD::Oracle::db do failed: ORA-01858: a non-numeric character > was found where a numeric was expected (DBD: oexec error) at > ff_report.cgi line 488. > > The types of each column in the database are: > > NAME,TYPE,NULLABLE > 'FAULT_NO','NUMBER(38)','Y' > 'REPORTED_BY','VARCHAR2(100)','Y' > 'PROJECT_NO','VARCHAR2(10)','Y' > 'PROJECT_COMMENTS','VARCHAR2(200)','Y' > 'DATE_OCCURRED','undef 9(0)','Y' > 'DATE_REPORTED','undef 9(0)','Y' > 'TIME_LOST','NUMBER(38)','Y' > 'ONE_LINE_SUMMARY','VARCHAR2(200)','Y' > 'ISSUE','VARCHAR2(2000)','Y' > 'NEW_REPORT','VARCHAR2(1)','Y' > 'ALLOCATED_TO','VARCHAR2(100)','Y' > 'FIX_STATUS','VARCHAR2(29)','Y' > > The trace output is included below: > > > > Many thanks, > > Stacy. > > 2 -> prepare for DBD::Oracle::db (DBI::db=HASH(0x2dab64)~INNER ' > INSERT INTO fault.report ( > FAULT_NO, > REPORTED_BY, > PROJECT_NO, > DATE_OCCURRED, > DATE_REPORTED, > TIME_LOST, > ONE_LINE_SUMMARY, > ISSUE, > NEW_REPORT, > ALLOCATED_TO > ) > VALUES (?,?,?,?,?,?,?,?,?,?) > ' undef) > dbd_preparse scanned 10 distinct placeholders > 2 <- prepare= DBI::st=HASH(0x3255dc) at DBI.pm line 950 > -> execute for DBD::Oracle::st (DBI::st=HASH(0x3255dc)~0x3257a4 > '1440' 'S MADER' 'p000' 'to_date('03-NOV-2001 13:34', 'DD-MON-YYYY > HH24:MI')' 'to_date('03-NOV-2001 16:05', 'DD-MON-YYYY HH24:MI')' '10' > 'test.' 'test. please ignore.' 'Y' 'NOT YET ALLOCATED') > bind :p1 <== '1440' (type 0) > bind :p1 <== '1440' (size 4/5/0, ptype 4, otype 1) > bind :p2 <== 'S MADER' (type 0) > bind :p2 <== 'S MADER' (size 7/8/0, ptype 4, otype 1) > bind :p3 <== 'p000' (type 0) > bind :p3 <== 'p000' (size 4/5/0, ptype 4, otype 1) > bind :p4 <== 'to_date('03-NOV-2001 13:34', 'DD-MON-YYYY > HH24:MI')' (type 0) > bind :p4 <== 'to_date('03-NOV-2001 13:34', 'DD-MON-YYYY > HH24:MI')' (size 51/52/0, ptype 4, otype 1) > bind :p5 <== 'to_date('03-NOV-2001 16:05', 'DD-MON-YYYY > HH24:MI')' (type 0) > bind :p5 <== 'to_date('03-NOV-2001 16:05', 'DD-MON-YYYY > HH24:MI')' (size 51/52/0, ptype 4, otype 1) > bind :p6 <== '10' (type 0) > bind :p6 <== '10' (size 2/3/0, ptype 7, otype 1) > bind :p7 <== 'test.' (type 0) > bind :p7 <== 'test.' (size 5/6/0, ptype 4, otype 1) > bind :p8 <== 'test. please ignore.' (type 0) > bind :p8 <== 'test. please ignore.' (size 20/21/0, ptype 4, otype > 1) > bind :p9 <== 'Y' (type 0) > bind :p9 <== 'Y' (size 1/2/0, ptype 4, otype 1) > bind :p10 <== 'NOT YET ALLOCATED' (type 0) > bind :p10 <== 'NOT YET ALLOCATED' (size 17/18/0, ptype 4, otype > 1) > dbd_st_execute (for sql f3 after oci f62, out0)... > !! ERROR: 1858 'ORA-01858: a non-numeric character was found where a > numeric was expected (DBD: oexec error)' > <- execute= undef at DBI.pm line 951 > !! ERROR: 1858 'ORA-01858: a non-numeric character was found where a > numeric was expected (DBD: oexec error)' > <- do= undef at ff_report.cgi line 488 > -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x325474)~INNER) > <- DESTROY= undef at ff_report.cgi line 488 > -> DESTROY for DBD::Oracle::st (DBI::st=HASH(0x3257a4)~INNER) > <- DESTROY= undef at ff_report.cgi line 488 > -> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x2dab64)~INNER) > <- DESTROY= undef at ff_report.cgi line 488
