| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: LONG datatype
In article <9f3d56$4vo$1_at_bcarh8ab.ca.nortel.com>, "Cameron says...
>
>Hi,
>>
>> I have a question regarding a problem with a long datatype. I am working
>> with two databases, one is oracle 7 the other oracle 8. I have a table
>> created in both databases with a field of LONG. Both tables were created
>> using the same script. The problem arises when I try to insert into the
>> table. The length of the data that is being inserted into the long field
is
>> 2573 bytes. In the oracle 8 database it inserts fine but when I try to
>> insert the same data into the oracle 7 databse I get the following error :
>>
>> Unexpected Error -1704 at newbsmpatch (note: perl program) line 97:
>> ORA-01704: string literal too long
The error is STRING LITERAL too long. character string constants in sql are limmited to the max length of a varchar2. In Oracle8 that is 4000 character. In Oracle7 that was 2000 characters.
You really need to be using bind variables in any case. bind variables are how you can get upto 2gig in length.
see
http://osi.oracle.com/~tkyte/Misc/LargeStrings.html
for an example.
>> Unable to insert into BSM_ADMINFILE.
>> rolling back work
>> Processes Terminated...
>>
>> When I look up the error code this is the response:
>>
>> 01704, 00000, "string literal too long"
>> // *Cause: The string literal is longer than 2000 characters.
>> // *Action: Use a string literal of at most 2000 characters.
>> // Longer values may only be entered using bind variables.
>>
>> In all the documentation I have regarding LONG datatypes in oracle 7 and 8
>> is that the data can be up to 2gb.
>>
>> My question is, is there a parameter that is set in the database which
>> limits the size of a LONG datatype? Could it be a part of the database
>> configuration or maybe a problem with the SQL server for the database? Is
>> there a difference between oracle 7 and oracle 8 that would cause this
>> problem?
>>
>>
>> Thank you
>>
>
>
>
Thomas Kyte (tkyte_at_us.oracle.com) Oracle Service Industries Howtos and such: http://asktom.oracle.com/ http://asktom.oracle.com/~tkyte/ Oracle Magazine: http://www.oracle.com/oramag Opinions are mine and do not necessarily reflect those of Oracle Corp Received on Wed May 30 2001 - 15:52:30 CDT
![]() |
![]() |