Ron S Cetnar wrote:
> 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;
Use bind parameters instead, to avoid quoting problems:
$sqlexec = qq{INSERT INTO ua_ps_sql_text_tble
(sql_id,sql_type,market,sql_text
VALUES
(?,?,?,?)};
$dbh->do($sqlexec, undef, $prog, $ext, $space_out, $sql_line);
Regards,
Philip