Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
DBMS_LOB.SUBSTR failed to retrieve 4000 characters
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
yuri.de...@gmail.com  
View profile  
 More options Nov 13 2008, 2:32 pm
Newsgroups: comp.databases.oracle.server
From: yuri.de...@gmail.com
Date: Thu, 13 Nov 2008 11:32:45 -0800 (PST)
Local: Thurs, Nov 13 2008 2:32 pm
Subject: DBMS_LOB.SUBSTR failed to retrieve 4000 characters
Hello,
Oracle throws the error when trying to retrieve first 4000 characters
from a CLOB column

SELECT DBMS_LOB.SUBSTR(clob_column,4000, 1) FROM tbl

ORA-06502: PL/SQL: numeric or value error: character string buffer too
small
ORA-06512: at line 1

Depends on the row it works fine only when I reduce the chunk size
from 4000 to 3550 or even less.
I run it on Oracle 11G

Please advice what is a problem.

Thank you,
Yuri


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Vladimir M. Zakharychev  
View profile  
 More options Nov 14 2008, 6:40 am
Newsgroups: comp.databases.oracle.server
From: "Vladimir M. Zakharychev" <vladimir.zakharyc...@gmail.com>
Date: Fri, 14 Nov 2008 03:40:42 -0800 (PST)
Local: Fri, Nov 14 2008 6:40 am
Subject: Re: DBMS_LOB.SUBSTR failed to retrieve 4000 characters
On Nov 13, 10:32 pm, yuri.de...@gmail.com wrote:

The SQL VARCHAR2 size is limited to 4000 BYTES, and you are trying to
fit 4000 CHARS into it, which, depending on the CLOB encoding and
content, may occupy more than 4000 bytes (for example when the
encoding is UTF-8 or anything like that and content features national
characters.) Reduce the amount to 2000 chars and there's good chance
you will never see ORA-6502 from DBMS_LOB.SUBSTR() again. Reduce it to
1000 chars and you definitely will never see it.

Hth,
   Vladimir M. Zakharychev
   N-Networks, makers of Dynamic PSP(tm)
   http://www.dynamicpsp.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »