I need to use a left outer join to get all of one table, and match it to specific instances of another table. Eg, report all of A, and where A has made a specific kind of B, report the name of that B.
Now, to get the specific B, I need to join three other relations together, and then do a string match. That's easy. I can report the subset of A that has made specific kind of B. I can report all of A. I can report all of A that has made all the kinds of B. But I can't report all of A with specific kinds of B.
I've been trying to use a Left outer join to join A to the subquery that'll tell me the specific kinds of B, and it tells me that the 'b' isn't a valid identifier.
EG:
[CODE=oracle]
select A.name, B.name
from A LEFT OUTER JOIN (
select * from B, C, D where b.foo= c.foo AND c.baa= d.baa
AND B.specifictype = 'My Type') ON a.poe= b.poe
group by A.name, B.name;
[/CODE]
it tells me b.poe isn't a valid identifier on line 4. I've tried putting an alias after the subquery, and joining on that alias instead, and it tells me that alias name isn't a valid identifier. Can someone show me where I'm going wrong?
Edit - I'm using Oracle9i EE, SQL*Plus 9.2
Now, to get the specific B, I need to join three other relations together, and then do a string match. That's easy. I can report the subset of A that has made specific kind of B. I can report all of A. I can report all of A that has made all the kinds of B. But I can't report all of A with specific kinds of B.
I've been trying to use a Left outer join to join A to the subquery that'll tell me the specific kinds of B, and it tells me that the 'b' isn't a valid identifier.
EG:
[CODE=oracle]
select A.name, B.name
from A LEFT OUTER JOIN (
select * from B, C, D where b.foo= c.foo AND c.baa= d.baa
AND B.specifictype = 'My Type') ON a.poe= b.poe
group by A.name, B.name;
[/CODE]
it tells me b.poe isn't a valid identifier on line 4. I've tried putting an alias after the subquery, and joining on that alias instead, and it tells me that alias name isn't a valid identifier. Can someone show me where I'm going wrong?
Edit - I'm using Oracle9i EE, SQL*Plus 9.2
Comment