Re: SQL help
Date: Tue, 24 May 2016 00:13:55 -0400
Message-ID: <5743D503.5030603_at_gmail.com>
Again, pipe lined PL/SQL function is your best bet.
On 05/23/2016 11:12 PM, Upendra nerilla wrote:
> Thanks Carlos and Tom for your suggestions.
> Sorry for not making it clear..I would like the data to appear in
> multiple rows which I will be passing it as a IN list to another query.
> Thanks
>
> ------------------------------------------------------------------------
> Date: Mon, 23 May 2016 18:48:07 -0400
> Subject: Re: SQL help
> From: troach_at_gmail.com
> To: nupendra_at_hotmail.com
> CC: oracle-l_at_freelists.org
>
> select a || chr(10) || b from test;
>
> On Mon, May 23, 2016 at 5:58 PM, Upendra nerilla <nupendra_at_hotmail.com
> <mailto:nupendra_at_hotmail.com>> wrote:
>
> Hey guys,
> Could someone help with a SQL:
>
> I have a test table with 2 rows:
>
> create table test (a varchar2(50), b varchar2(50));
> insert into test values ('one', 'first row');
> insert into test values ('two', 'second row');
> commit;
>
> I need a query that shows the output as the following (without
> using union). Order of the values is not important.
>
> OUTPUT
> =======
> one
> first row
> two
> second row
>
> I thought unpivot might work, poked around a bit.. my brain is too
> tired to think..
>
> Thanks in advance
> -Upendra
>
>
>
>
> --
> Thomas Roach
> 813-404-6066
> troach_at_gmail.com <mailto:troach_at_gmail.com>
-- Mladen Gogala Oracle DBA Tel: (347) 321-1217 -- http://www.freelists.org/webpage/oracle-lReceived on Tue May 24 2016 - 06:13:55 CEST