How to query up the newline (||) character in SQL editor
Posted in 2005
Topics: General Discussion
I have a bunch of comments rows with just plain text in them but some
of them have a newline character in them (||). I need to replace all
instances of these newlines (in a certain row) with a blank space, or
anything for that matter. I just need to get rid of them.
Right now I am just trying to query them out like so:
select * from certain_tables where comment like '%(need identifierhere)%';
what do i put for that identifier to get the newline characters?
thanks
Jason Ip wrote:
> I have a bunch of comments rows with just plain text in them but some
> of them have a newline character in them (||). I need to replace all
> instances of these newlines (in a certain row) with a blank space, or
> anything for that matter. I just need to get rid of them.
>
> Right now I am just trying to query them out like so:
>
> select * from certain_tables where comment like '%(need identifier> here)%';
>
> what do i put for that identifier to get the newline characters?
You cannot. You'll have to write a host language program in ESQL/C, C-ODBC,
Perl/DBD/DBI, Java/JDBC, etc. and filter, and correct the data in the host
program then update the offending rows.
Art S. Kagel
> thanks