Re: - Mailing list pgsql-general

From Pavel Stehule
Subject Re:
Date
Msg-id 162867790807170059y7c3f08bcuc639f149ba457cf4@mail.gmail.com
Whole thread Raw
In response to  (Paweł Sobański <cfjxcut@wp.pl>)
List pgsql-general
Hello

2008/7/17 ram subbu <ramgv80@yahoo.com>:
> Hi All,
>     Here i am facing a peculiar scenario. I have a query which always result
> in 3 rows. There are two columns in the query result. I have to make the
> result of 3 rows as a one row
>  select * from tab1;
>
> col1---col2
> ---------------
> 1            5
> 2            38
> 3            50
>
> the result should be
>

select array_to_string(array(select col1 || '-' || col2 from tab1), '/');

regards
Pavel Stehule

> col
> ----
> 1-5/2-38/3-50
>
> Is there any possibilities?
>
>

pgsql-general by date:

Previous
From: Chris
Date:
Subject: Re: Default fill factor for tables?
Next
From: el dorado
Date:
Subject: Standard binaries compilier - how to know?