Ron,

I suggest you:

1.  Use bind variables for your insert statement.  It might be that some
character in your variables which is causing the problem.
2.  Look at the PL/SQL block that is part of the error message.  The
statement fragment "PROG.EMPLID NID.NATIONAL_ID prog.admit_term" looks
like it is missing commas.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Ron S Cetnar [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 30, 2007 1:10 PM
To: [email protected]
Subject: Clob insert problem on a Oracle db with DBI

I have a problem inserting a line of text into a CLOB data field in
Oracle.  The version of PERL is 5.8 running on a AIX server 5.2.  It
looks like when I'm doing the insert, it is looking at the text to
execute.  The text is a sql statement that I'm trying to load.

Any help would be greatly appreciated.

Thanks.

Ron

Below is my insert statement and the error ORACLE error that I'm
getting.  

PERL statement to do the insert:



                $sqlexec = qq{INSERT INTO ua_ps_sql_text_tble (sql_id,
sql_type, market, sql_text)
                    values ('$prog', '$ext', '$space_out',
'$sql_line')};
          $sth=$dbh->prepare($sqlexec); 
          $sth->execute;


On the 5th line down about 2/3 in is the <*> where the possble error
occurs:



DBD::Oracle::st execute failed: ORA-00917: missing comma (DBD ERROR:
error possibly near <*> indicator at char 367 in 'INSERT INTO
ua_ps_sql_text_tble (sql_id, sql_type, market, sql_text)
                    values ('uaad2dar', 'sqr', ' ', 'begin-SELECT
distinct  PROG.EMPLID NID.NATIONAL_ID prog.admit_term  from PS_ACAD_PROG
PROG,  PS_ACAD_PLAN PLAN, PS_PERS_NID NID where PROG.EMPLID \=
NID.EMPLID AND SYSDATE between (prog.action_dt - 5) and (prog.action_dt
+ 5) AND PROG.ACAD_CAREER \= \'<*>UGRD\' AND PROG.INSTITUTION \=
\'ALBNY\' AND PROG.PROG_STATUS \= \'AC\' AND PROG.acad_prog not in
(\'UNIHS\',\'GENS2\',\'GENST\',\'GENCO\',\'UIELP\',\'VISIT\',\'SANON\',\
'SASUN\',\'CROSS\',\'HSVIS\') AND PROG.EFFDT \=  (select max(EFFDT) from
PS_ACAD_PROG PROG1 where PROG1.EMPLID \= PROG.EMPLID  AND
PROG1.ACAD_CAREER \= PROG.ACAD_CAREER AND PROG1.STDNT_CAR_NBR \=
PROG.STDNT_CAR_NBR AND PROG1.PROG_STATUS \= \'AC\' AND PROG1.acad_prog
not in
(\'UNIHS\',\'GENS2\',\'GENST\',\'GENCO\',\'UIELP\',\'VISIT\',\'SANON\',\
'SASUN\',\'CROSS\',\'HSVIS\') AND PROG1.EFFDT <\= sysdate) AND
PROG.EFFSEQ \= (select max(EFFSEQ) from PS_ACAD_PROG PROG2 wh

*********************************************************
Ron Cetnar
 
Supervising Programmer/Analyst/Oracle DBA
University applications Development (UAD)
 
Building:  Management Service Center - 100 
Room 110
1400 Washington Ave
Albany, NY 12222
Work Phone:  518 437-4535
Fax Number:  518 437-4540
Email Address: [EMAIL PROTECTED]
 
**********************************************************
 

This electronic message transmission is a PRIVATE communication which contains
information which may be confidential or privileged. The information is 
intended 
to be for the use of the individual or entity named above. If you are not the 
intended recipient, please be aware that any disclosure, copying, distribution 
or use of the contents of this information is prohibited. Please notify the
sender  of the delivery error by replying to this message, or notify us by
telephone (877-633-2436, ext. 0), and then delete it from your system.

Reply via email to