Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Transposing rows to columns

Re: Transposing rows to columns

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 25 Jul 2006 00:56:12 -0700
Message-ID: <1153770998.430487@bubbleator.drizzle.com>


pallavi.jayanti_at_gmail.com wrote:
> Dear readers,
>
> I have data in 2 tables in the following manner:
>
> Table A:
>
> Source_Code BU_SET_ID Account_Number
> ALS 3 1415999
> ALS 1 1415999
>
>
> Table B:
>
> BU_SET_ID BU_type BU_Code
> 1 LOB TEST
> 3 REICO SURP
>
> I need the o/p to look like:
>
> Source_Code Account_Number LOB REICO
> ALS 1415999 TEST
> SURP
>
> Any help is appreciated.

Use DECODE or CASE. Demos of cross-tabulation are present in Morgan's Library at www.psoug.org under DECODE.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Jul 25 2006 - 02:56:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US