Oracle string processing functions

Source: Internet
Author: User

Ora-22835: buffer to small for clob to Char or blob to raw conversion (actual string, maxinum string)

 

Cause: an attempt was made to convert clob to Char or blob to raw, where the lob size was bigger than the buffer limit for char and raw types. note that widths are reported in characters if character length semantics are in effect for the column, otherwise widths are reported in bytes.

 

Action: do one of the following:

1. Make the lob smaller before login Ming the conversion, for example, by using substr on clob

2. Use dbms_lob.substr to convert clob to Char or blob to raw.

 

In this case, generally use to_char (substr (XXX, 1, length) for conversion, directly use to_char for conversion will report a ora-22835 error!

Length is optional. It is the number of characters to extract. If this parameter is omitted, substr will return the entire string.
When length () is used to query the length of a string, the number of strings is counted, not the number of bytes.

 

In Oracle, varchar2 and char can store 8000 bytes in length. If the conversion exceeds this limit, an error occurs.

 

 

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.