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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: ORA-01704 "String Literal Too Long"

RE: ORA-01704 "String Literal Too Long"

From: Saj Raza <saj.raza_at_qxl.com>
Date: Mon, 21 May 2001 09:43:09 -0700
Message-ID: <F001.00309646.20010521094109@fatcity.com>

Benajam,

If you know it you can use Perl, with something like the code below which will insert a string containing the value I_inserted_a_long_abcd1234567890qweerrtrtyyuuiiioooooooooooppppppp concatenated a 100000 times, and replace $long_field with your own data or do a loop to read it in from a file.

Saj

#!/usr/bin/perl
#
use strict;
use DBI;

$|=1;

my $long_field =
"I_inserted_a_long_abcd1234567890qweerrtrtyyuuiiiooooooooooop pppppp"x100000;

my $dbi_driver = 'DBI:Oracle:';
my $connstr = 'username';
my $pw = 'password';
my $dbh = DBI->connect($dbi_driver, $connstr, $pw) ||
die "Unable to Connect:\n".$DBI::errstr;

my $mysql = qq { insert into qxl.lobtest(col1) values (?) } ;

my $sth = $dbh->prepare( $mysql );
$sth->bind_param( 1, $long_field );

$sth->execute;
$sth->finish;
$dbh->disconnect;



> -----Original Message-----
> From: benajam lhoussain [SMTP:lb_at_citycom.fr]
> Sent: Monday, May 21, 2001 4:31 PM
> To: Multiple recipients of list ORACLE-L
> Subject: ORA-01704 "String Literal Too Long"
>
> Hi, I created a table with a LONG type. From what I read in the Oracle
> docs
> LONG supports up to 2 gigs of data. But I am not able to insert more than
> 4000 characters into that field.
> i have this message error : ORA-01704 "String Literal Too Long"
>
> any help please.
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: benajam lhoussain
> INET: lb_at_citycom.fr
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).



This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify postmaster_at_qxl.com

This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Saj Raza
  INET: saj.raza_at_qxl.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Mon May 21 2001 - 11:43:09 CDT

Original text of this message

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