Hi,
I have a problem with multiple column outer join. Here is my schema
Table: parent
module : Integer
name : varchar
id : Integer
desc : Text
Table: child
module : Integer
id1 : Integer
id2 : Integer
id3 : Integer
status : Char(1)
Here id1,id2,id3 points to parent.id
Here i want to fetch all those records from "parent" and "child" where "id1" or "id2" or "id3" is equal to "id" from parent.
This should be outer join i,e even if there are no matches in "child", it should fetch the "parent" records with child columns null.
my current query for a single column join is (I am using Oracle)
select parent.*,child.* from parent,child where parent.module = 'my module' and child.module (+) = 'my module' and parent.id = child.id1 (+)
This works fine for one column ..i,e id1 .. my problem is "How do i modify the above query to work for id1,id2 and id3"
Thanks in Advance ..
Regards,
Danny ..
I have a problem with multiple column outer join. Here is my schema
Table: parent
module : Integer
name : varchar
id : Integer
desc : Text
Table: child
module : Integer
id1 : Integer
id2 : Integer
id3 : Integer
status : Char(1)
Here id1,id2,id3 points to parent.id
Here i want to fetch all those records from "parent" and "child" where "id1" or "id2" or "id3" is equal to "id" from parent.
This should be outer join i,e even if there are no matches in "child", it should fetch the "parent" records with child columns null.
my current query for a single column join is (I am using Oracle)
select parent.*,child.* from parent,child where parent.module = 'my module' and child.module (+) = 'my module' and parent.id = child.id1 (+)
This works fine for one column ..i,e id1 .. my problem is "How do i modify the above query to work for id1,id2 and id3"
Thanks in Advance ..
Regards,
Danny ..