Re: UPDATE table: Syntax to Remove Terminal '\n' [RESOLVED]

From: Rich Shepard <rshepard(at)appl-ecosys(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: UPDATE table: Syntax to Remove Terminal '\n' [RESOLVED]
Date: 2014-08-27 23:13:24
Message-ID: alpine.LNX.2.11.1408271610030.11534@localhost
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 27 Aug 2014, Jeff Ross wrote:

> You want the E in front of the entire string, not just before the \n.
> select
> 'Use Discover: ' || E'\t' || 'Yes' || E'\n'

Jeff,

That did the trick. Turns out that 202 of 204 rows had the newline! The
syntax that worked:

update benthos set stream = 'StarvationCrk' where stream = E'StarvationCrk\n';

Much appreciated,

Rich

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G Johnston 2014-08-28 00:07:16 Re: Atomicity of INSERT INTO ... SELECT ... WHERE NOT EXISTS ...
Previous Message Ian Barwick 2014-08-27 23:08:56 Re: UPDATE table: Syntax to Remove Terminal '\n'