Обсуждение: Inserting CR/LF in a select?

Поиск
Список
Период
Сортировка

Inserting CR/LF in a select?

От
Bjørn T Johansen
Дата:
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?


Regards,

BTJ

--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj@havleik.no                  Havleik Consulting
Phone : +47 67 54 15 17         Conradisvei 4
Fax : +47 67 54 13 91           N-1338 Sandvika
Cellular : +47 926 93 298       http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------


Re: Inserting CR/LF in a select?

От
"David Olbersen"
Дата:
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

Re: Inserting CR/LF in a select?

От
Bjørn T Johansen
Дата:
Of course it will.... Thanks... :)

BTJ

On Fri, 2003-08-22 at 19:47, David Olbersen wrote:
> 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.