Click to See Complete Forum and Search --> : Query doubt


santhoshvijay
02-28-2003, 02:03 AM
I have one master table and a detail table. How can I get all the rows in the detail table for a perticular key in the master table int o a single row. For Eg

Master
-------
key date
1 1-jan-03


detail
------
key date desc
1 1-jan-03 description1
1 1-jan-03 description2



The result should be
------------------------------------
1 1-jan-03 description1 description2



Thanks in advance
Santhosh

mkumarnk
02-28-2003, 02:09 AM
select a.field1,a.field2,b.field1,b.filed2
from master a,detail b
where a.key(+)=b.key

More over if u have enforced the foreign key relation from detail to master(ie Master deatils relation) thsi kind of scenarion wont be happen but vice versa..