-
In sybase, we are trying to do an outer join to 2 levels...
i.e. table A outer joing to table B... and table B outer join to Table C.
so the where clause would be like this...
WHERE
TABLE_A.colA1 *= TABLE_B.colB1
AND TABLE_B.colB2 = TABLE_C.colC1
note, I am outer joining down the tree, but different columns are being joined from A to B, and B to C.
This fails in sybase... it gives me an WHERE CLAUSE ERROR statement.
Is this even possible in Oracle? Any ideas around this?
thanks
-
First of all, I don't remember any more, does *= correspond to (+)= or =...(+)?
Next, you say that you are outer-joining b to c, but your example does not show this.
- Chris
-
How the tables are related will determine how to relate the tables. If there is one common column in all three tables which relates them, such as an SSN, then one of the three tables must contain all of the records, and be related to the other two tables in the where clause:
select * from tableA, tableB, tableC
where tableA.col=tableB.col(+) and
tableA.col = tableC.col(+);
However, if there is a relationship between tables A and B, and a different relationship between tables B and C, then:
select * from tableA, tableB, tableC
where tableA.col=tableB.col_1(+) and
tableB.col_2=tableC.col(+);
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|