Re: Inserting CR/LF in a select?

From: "David Olbersen" <DOlbersen(at)stbernard(dot)com>
To: Bjørn T Johansen <btj(at)havleik(dot)no>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Inserting CR/LF in a select?
Date: 2003-08-22 17:47:54
Message-ID: E7E213858379814A9AE48CA6754F5ECB0D707F@mail01.stbernard.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bjørn T Johansen muttered:

> I need to get two fields from two tables and append them into one field
> with CR/LF in between, how is this done using a select?

I believe something along the lines of:

SELECT column1||'\r\n'||column1 FROM table;

will do the trick.

--
David Olbersen
iGuard Engineer
St. Bernard Software
11415 West Bernardo Court
San Diego, CA 92127

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hervé Piedvache 2003-08-22 18:30:28 WAL Files checkpoint_timeout with voluminous delete/insert
Previous Message Bjørn T Johansen 2003-08-22 17:38:11 Inserting CR/LF in a select?