Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Insert error

Insert error

From: MattJ83 <mattjones_at_hotmail.co.uk>
Date: 20 Sep 2006 03:24:13 -0700
Message-ID: <1158747853.066817.218930@i42g2000cwa.googlegroups.com>


Hi,

Im having some trouble with my insert statement. Im using TOAD and my code has been written in PERL.

Insert statement:

$dbh->do ("INSERT INTO TEST4 (log_name, db_no, updates, deletions, fastsearch, error) VALUES
(TO_DATE(SUBSTR('$filename',1,INSTR('$filename','_')-1),
'YYYYMMDDHH24'),

SUBSTR('$filename',INSTR('$filename','_')+1,INSTR('$filename','_')-8), $update, $deletion, $elapsed, $fast)");

The statement works fine when $fast is replaced by 'text' and when it is left out. $fast has text data in it. The error is:

DBD::Oracle::db do failed: ORA-00917: missing comma (DBD ERROR: OCIStmtExecute) [for statement ``INSERT INTO TEST4 (log_name, db_no, updates, deletions, fastsearch, error) VALUES (TO_DATE(SUBSTR('2006090603_103_fs.log',1,INSTR('2006090603_103_fs.log','_')-1),
'YYYYMMDDHH24'),

SUBSTR('2006090603_103_fs.log',INSTR('2006090603_103_fs.log','_')+1,INSTR('2006090603_103_fs.log','_')-8), 0, 0, 2, Updating pending FASTSEARCH for MOLSTRUCTURE )'']) at ./test10.pl line 55.

I have checked my single/double quotes and checked my brackets. i don't think my problem is with the PERL code because it is reading:
'Updating pending FASTSEARCH for MOLSTRUCTURE' .

Any help would be great. Received on Wed Sep 20 2006 - 05:24:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US