Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Searching for newline characters in a varchar

Re: Searching for newline characters in a varchar

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/10/16
Message-ID: <19971016001901.UAA26381@ladder01.news.aol.com>#1/1

>Subject: Re: Searching for newline characters in a varchar
>From: GreMa_at_t-online.de (Matthias Gresz)
>Date: Tue, Oct 14, 1997 07:32 EDT
>Message-id: <61vl8s$8hu$1_at_news02.btx.dtag.de>
>
>Bryan J. Gentile wrote:
>>
>> I want to find out how I can search through a variable of type varchar
>> and replace newline characters with something else. (PL/SQL)
>>
>> --
>> **************************************
>> Bryan J. Gentile
>> Consultant
>> Business Data Services, Inc.
>> Glastonbury, CT 06033
>> Phone: (860) 633-3693 (ext. 3006)
>> Vmail: (ext. 6030)
>> **************************************
>Hi,
>
>try
>
>SUBSTR(string,1,INSTR(string,chr(13))-1) || newchar
>||SUBSTR(string,INSTR(string,chr(13)) + 1,length(string))
>
>--
>Regards
>
>M.Gresz :-)

Well you could do that, but it will only find the first instance.

Try

 my_string := replace(my_string,chr(13),null)

Note that the newline character is operating system specific. Substitute for chr(13) as necessary

Example

my_string := replace(my_string,chr(10),null);

John



John C. Lennon
Utility Partners Inc.
4300 West Tropicana Blvd LVO-UPL
Las Vegas NV 89103

FOR UTILITY PARTNERS EMPLOYMENT
OPPORTUNITIES VISIT www.utilpart.com

e-mail: jomarlen_at_aol.com
Web Site: http://members.aol.com/jomarlen/

The views expressed in this message
are those of the author and not
necessarily those of U.P. Inc.
and/or its employees.


Received on Thu Oct 16 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US