Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Remove empty lines and Line Breaks in text

MaxDec 20 2016 — edited Dec 21 2016

DB Version : 11.2.0.4

I have a table column which stores text like below (shown withing single quotes).

create table test2 (issue_desc varchar2(2000));

--- Cannot INSERT from SQL*Plus due to "SP2-0734: unknown command beginning"

--- So, I did this from PL/SQL developer . It should work from Toad/ SQL Developer

--- Maybe there is a workaround in SQL*Plus for this

insert into test2 values

(

'Issue Description:

Issue1- Call getting disconnected after 7pm

Issue2- Amount deducted

Credit being deducted but cust unable to use the service

Cust insists for refund if unable to use the service

Futher investigation Needed. TQ'

);

Requirement1 : How can I remove empty (blank) lines from the above column so that text will appear as follows :

Issue Description:

Issue1- Call getting disconnected after 7pm

Issue2- Amount deducted

Credit being deducted but cust unable to use the service

Cust insists for refund if unable to use the service

Futher investigation Needed. TQ

Requirement2: How can I replace all New Lines (Enter key) from the above column and replace it with a full stopĀ  (in red) so that text will appear as follows :

Issue Description:Issue1- Call getting disconnected after 7pm. Issue2- Amount deducted

.Credit being deducted but cust unable to use the service.Cust insists for refund if unable to use the service.Futher investigation Needed. TQ

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 18 2017
Added on Dec 20 2016
16 comments
8,344 views