ORA-01704 String Literal Too Long

2001-05-21 Thread benajam lhoussain

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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



Re: ORA-01704 String Literal Too Long

2001-05-21 Thread Thater, William

On Mon, 21 May 2001,benajam lhoussain scribbled on the wall in glitter crayon:

-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.
-
-
-
To insert that long a literal, you run up against an SQL*Plus limitation.  You'll have 
to insert it in chunks, keeping track of where the last one ended so you know where to 
start the next one.

--
Bill Thater Certifiable ORACLE DBA
Telergy, Inc.[EMAIL PROTECTED]
~~
You gotta program like you don't need the money,
You gotta compile like you'll never get hurt,
You gotta run like there's nobody watching,
It's gotta come from the heart if you want it to work.
~~
LISP: To call a spade a thpade.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thater, William
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).



RE: ORA-01704 String Literal Too Long

2001-05-21 Thread Saj Raza

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_abcd1234567890qweerrtrtyyuuiiioooppp
concatenated a 10 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_abcd1234567890qweerrtrtyyuuiiiooop
ppx10;

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:[EMAIL PROTECTED]]
 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: [EMAIL PROTECTED]
 
 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: [EMAIL PROTECTED] (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
[EMAIL PROTECTED]

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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).