Fwd: join query

From: Ingrid Voigt <giantpanda_at_gmx.net>
Date: Wed, 21 Jan 2009 11:16:33 +0100
Message-ID: <20090121101633.279810_at_gmx.net>



Why don't you want the result to look like

pos_id case_id box_id

2               C1                  B2
2               C2                  B1
2                                     B3
2                                     B3

Is there an order or something hidden between case_id and box_id?

And where does B3 come from, it's not in the box table?

Regards
Ingrid

  • Original-Nachricht -------- Datum: Tue, 20 Jan 2009 11:28:50 -0600 Von: "Krishan Gupta" <krishan.gupta_at_etcc.com> An: oracle-l_at_freelists.org Betreff: join query

Hi all..,  

This may be very simple but I guess I need experts help for the following in oracle 10g database :-  

select * from xx_case;  

pos_id case_id

2                C1

2                C2

 

 

select * from xx_box;  

pos_id box_id

2                B1

2                B2

 

The only common column between these two tables is pos_id.  

How do I write query from these two tables so that the output result would be  

pos_id case_id box_id

2               C1                  B1

2               C2                  B2

2                                     B3

2                                     B3

 

 

Thanks and Regards

Krishan  

--

NUR NOCH BIS 31.01.! GMX FreeDSL - Telefonanschluss + DSL für nur 16,37 EURO/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a
--

http://www.freelists.org/webpage/oracle-l Received on Wed Jan 21 2009 - 04:16:33 CST

Original text of this message