Oracle removes line breaks from data to avoid reading problems.

Source: Internet
Author: User

Oracle removes line breaks from data to avoid reading problems.

After a lot of data is stored in the database, you may need to extract the entire data and separate it with special symbols. The entire data must be in one row.
When the line breaks, there will be a problem during reading.

In this case, you need to perform special processing on the data to be retrieved, that is
Remove the line feed characters:

replace(replace(columnName,CHR(10),''),chr(13),'')

Supplement:
Special symbol ascii Definition
Tab chr (9)
Linefeed chr (10)
Carriage Return chr (13)


When an SQL exception occurs in Oracle databases using java, the egetMessage () is used to obtain the exception information. Why is there a line break at the end of the exception information?

[Oracle @ mlab2 ~] $ Oerr ora 1, 6576
06576,000 00, "not a valid function or procedure name"
// * Cause: cocould not find a function (if an INTO clause was present) or
// A procedure (if the statement did not have an INTO clause)
// Call.
// * Action: Change the statement to invoke a function or procedure

It is related to the function or process called by your code. The name you provided may be incorrect.
 
Replacing line breaks in oracle

When the cursor is made, add the constraints.
Cursor cur_aaa is
Select * from
Where (A. AAA like '%' | chr (10) | '%'
Or A. AAA like '%' | chr (13) | '% ')
And
A. AAA not like '%' | chr (10) | chr (13) | '%'

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.