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 -> How to write a view to de-normalize the table rows?

How to write a view to de-normalize the table rows?

From: mullin <mullin.yu_at_gmail.com>
Date: 8 Sep 2005 04:52:26 -0700
Message-ID: <1126180346.392356.7540@g49g2000cwa.googlegroups.com>


i have the following table structure with sample data

TranxID RowID Table Description NewValue OldValue

1000          1         Table1      IDX                 1
1000          1         Table1      MAPPING             A
B
1000          2         Table1      IDX                 2
1000          2         Table1      MAPPING             X
Y
1000          1         Table2      IDX                 1
1000          1         Table2      MAPPING             C
D
2000          1         Table1      IDX                 1
2000          1         Table1      MAPPING             B
U

i want to write a view to group them into the following structure

TranxID RowID Tb1_IDX_New Tb1_IDX_Old Tb1_MAPPING_New Tb1_MAPPING_Old Tb2_IDX_New Tb2_IDX_Old Tb2_MAPPING_New Tb2_MAPPING_Old

1000     1      1                       A               B
1                       C               D
1000     2      2                       X               Y
2000     1      1                       B               U
Received on Thu Sep 08 2005 - 06:52:26 CDT

Original text of this message

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