RE: Clob insert problem on a Oracle db with DBI



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
.



Relevant Pages

  • Clob insert problem on a Oracle db with DBI
    ... I have a problem inserting a line of text into a CLOB data field in ... The version of PERL is 5.8 running on a AIX server 5.2. ... Below is my insert statement and the error ORACLE error that I'm ...
    (perl.dbi.users)
  • Re: ANNOUNCE: DBD:Oracle 1.18
    ... Well a warning in one compiler is better than and error in an other so I ... This might be a problem more with the older oracle OCI in your client. ... perl -Mblib t/26exe_array.t ...
    (perl.dbi.users)
  • Re: float bug? perl 5.8, DBI and oracle 10.2.0
    ... If you want to store high precision numbers in oracle, you've got 38 decimal digits to play with, and with minimal coaxing perl will handle them as strings at the appropriate points so that the exact values go in and come out. ... I haven't done any numerical work in 10 years or so, but I seem to recall that one can reasonably expect 6 or so decimal significant digits from a 32 bit floating point number - I'll go out on a limb and hazard that one can expect 12 or so digits from a 64 bit floating point number - at any rate I'd be very surprised to get 18 significant digits. ...
    (perl.dbi.users)
  • RE: Memory fault(coredump) with two DBD type connections
    ... I get a core dump ... all the libraries are the same threaded model(single threaded perl uses ... I am running Perl 5.8.8 with DBD-Oracle 1.19 compiled against Oracle ... when I try to connect to the same Oracle database AND same DB2 database ...
    (perl.dbi.users)
  • Re: Is perl better? :(((
    ... >> Wasthe original PERL script hitting an Oracle database? ... >> Did you run an explain plan on your Oracle SQL? ... Java and perl on another. ...
    (comp.lang.java.databases)