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: Select result with column from rows in another table.

Re: Select result with column from rows in another table.

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 12 Apr 2006 06:24:18 -0700
Message-ID: <1144848258.735411.100370@u72g2000cwu.googlegroups.com>


I got interrupted and when I looked at my post I thought it was complete till right after I posted.

First from your diagram I am not sure if you just want to join the tables or if you want to pivot the rows into columns or possibly both at once. My confusion comes from the final diagram where in your header you list row_a and row_b. If these should have been col_a and col_b then you are just showing a simple join but if the row_a and row_b are Table A rows then you are pivoting as well as joining.

 My first post mentioned that you can find examples of pivoting in the archives. You can also find a technique or two at http://asktom.oracle.com on the subject.

For joining the tables you just need a where clause condition where the key of A = key of B to make all the columns from both tables available one one row. You can write a pivot and join the result.

HTH -- Mark D Powell -- Received on Wed Apr 12 2006 - 08:24:18 CDT

Original text of this message

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