Join conditions between Reports Builder queries are not limited to those you can specify through Data Model links. If the join condition cannot be constructed with one or more Data Model links, you can :
Establish the desired parent-child relationship between the two groups by creating a "dummy link" (click the Link tool in the tool palette, click the parent group, and then on the child group).
Type the join condition
in the WHERE clause of the child query, referencing columns in the parent
query as bind variables. In your case, add this to the WHERE clause:
"WHERE :SAL
<=LOSAL
OR :SAL >=HISAL"
Notice that columns belonging to the parent query can be referenced anywhere in the child query, and the join condition can be as complex as needed.
Query 1 deptno,ename,sal
Query 2 salgrade,hisal,losal
If you then specified a link between sal and hisal, then another link between sal and losal, this presumably would set up the report to show:
WHERE SAL >= LOSAL AND SAL <= HISAL
but if you really wanted the report to show:
WHERE SAL <= LOSAL OR SAL >= HISAL
you just can't change the signs around otherwise you would get:
WHERE SAL <= LOSAL AND SAL >= HISAL
which would return zero rows.
To accomplish the desired result, create a dummy link and type the desired clause.
About conditions (Query Builder)
Adding conditions to a query (Query Builder)
Copyright © 1984, 2005, Oracle. All rights reserved.