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 -> 3 tables join

3 tables join

From: Nick <nachiket.shirwalkar_at_gmail.com>
Date: Thu, 08 Nov 2007 07:46:08 -0800
Message-ID: <1194536768.112457.113620@i13g2000prf.googlegroups.com>


I have have 3 tables TableA, TableB and TableC. TableA holds the keys to TableB and TableC. I need a query which will display the details from TableB and TableC depending on the key in TableA.

For eg.

TableA - columns {id, relatedkey, recordType} ===recordType will hold values like TableB or TableC
TableB - columns{id, column1}
TableC - columns{id, column1}

the query should match the related key to the id of TableA or table B based on recordType and show the column1 value with the TabelA id so output for this should be

id recordType column1

1      TableB             value of TableB column1
2      TableC             value of TableC column1


Please help.

Cheers
Nick Received on Thu Nov 08 2007 - 09:46:08 CST

Original text of this message

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