Re: sql statement to find carriage return

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 18 Dec 2003 10:55:06 -0800
Message-ID: <336da121.0312181055.5ceccb4_at_posting.google.com>


Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1071701407.299559_at_yasure>...
> Alex Filonov wrote:
> [Quoted]
> > "Bill Thomason" <billthomason_at_charter.net> wrote in message news:<vtur8v91iqmi93_at_corp.supernews.com>...
> >
> >>I am looking for a simple sql statement to find carriage returns in our data
> >>that has been loaded.
> >>
> >>Bill
> >
> >
> > select <whatever you want>
> > from <your table>
> > where instr(<column you want to check>, chr(13)) != 0 /* DOS character */
> > or instr(<column you want to check>, chr(10)) != 0 /* carriage-return */
> >
> > Only works with charactersets which are ASCII supersets.
>
> You are assuming the field is a CHAR or VARCHAR2. That is only an
> assumption as the OP never stated the data type. It could be a LONG
> or a CLOB: We just don't know.

As a real programmer, I give incomlete answer in hope that if it doesn't work, the customer would come back with new questions. :-) Received on Thu Dec 18 2003 - 19:55:06 CET

Original text of this message