Re: remove embedded carriage returns

From: Jonathan Hedstrom <jhedstrom(at)desc(dot)org>
To: chwy_nougat(at)yahoo(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: remove embedded carriage returns
Date: 2007-01-10 21:45:23
Message-ID: 45A55E73.9080006@desc.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

chwy_nougat(at)yahoo(dot)com wrote:
> "SELECT replace(columname, 'chr(13)','') from tablename"

Try using chr(13) without the single quotes:

SELECT replace(columname, chr(13),'') from tablename

or you could use '\r' to get the character:

SELECT replace(columname, E'\r','') from tablename

-Jonathan

Attachment Content-Type Size
jhedstrom.vcf text/x-vcard 236 bytes

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Walter Vaughan 2007-01-10 21:52:41 Re: Trying to load MySQL data
Previous Message Martijn van Oosterhout 2007-01-10 21:43:46 Re: Export to shape file