Thread:

From
Paweł Sobański
Date:

----------------------------------------------------
Co Isis Gee mówi po polsku? Zobacz
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fisid.html&sid=368



Re:

From
"Pavel Stehule"
Date:
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?
>
>