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!

translate clobs

frm40735Apr 8 2013 — edited Apr 8 2013
Connected to Oracle Database 10g Enterprise Edition Release 10.1.0.5.0
create table d_comments
(order_no varchar2(12),
line_no number(11),
comments clob);

INSERT INTO d_comments
	(order_no,
	 line_no,
	 comments)
VALUES
	('A12345',
	 '1',
	 'THIS IS THE BEGINNING
     PAYMENT TERMS ~~~~~~~~~~~~~~~~
60 Days Nett Monthly
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THIS IS THE END');
What i am trying to do is filter out PAYMENT TERMS ~~~~~~~~~~~~~~~~
60 Days Nett Monthly
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ in the test thus returning
THIS IS THE BEGINNING
THIS IS THE END

I've tried this but it is returning null

SELECT TRANSLATE(dbms_lob.substr( COMMENTS, 4000, 1 ),'THIS IS THE BEGINNING
PAYMENT TERMS ~~~~~~~~~~~~~~~~
60 Days Nett Monthly
.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~',null) FROM D_COMMENTS


any help will be most appreciated. Thanks
This post has been answered by BluShadow on Apr 8 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2013
Added on Apr 8 2013
3 comments
346 views