-
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
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
-
Hi,
I think you just need to break up your insert statment a little.
instead of this :
insert into my_table (my_long) values ('2573 bytes worth of stuff');
try this :
insert into my_table (my_long) values (
'first 2000 bytes' || ' the rest');
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|