<link>
XML tagThe <link>
tag defines
a link between data sources in the data model. The <link>
tag must be nested within the <data>
tag. Data sources are linked by columns. Hence each column link requires parent
and child column attributes and a condition attribute that relates the columns.
In order to join two tables or views, the foreign key columns must have a column
alias in the SELECT statements. (These aliases are used to reference the parent
and child column in the column link specification.)
<link
parentGroup="parent_group_name"
parentColumn="parent_column_name"
childQuery="child_query_name"
childColumn="child_column_name"
condition="eq | lt | lteq | neq | gt | gteq |
like | notLike"
sqlClause="startWith | having | where"
name="link_name"
>
</link>
Parameters /Options |
Description |
|
Is the name of the parent group that you want to relate to the child query. Required for group links, but optional for column links. |
|
Is the name of a column in the parent query that relates to a column in the child query (that is, child column). Required for column links, but optional for group links |
|
Is the name of the child query that relates to the parent group. Required for group links, but optional for column links |
|
Is the name of a column in the child query that relates to a column in the parent query (that is, parent column). Required for column links, but ignored for group links |
|
Is a SQL operator that defines the relationship between parent column and child column. Valid values are:
|
|
Is the type of SQL clause that relates the parent group to the child query. The default is a WHERE clause. |
|
Is a name for the link. |
The following example shows the data model segment of a report definition with a link between two queries:
<data>
<dataSource name="Q_dept">
<select>
select deptno deptno_dept from dept
</select>
</dataSource>
<dataSource name="Q_emp">
<select>
select deptno deptno_emp, ename, empno, sal from emp
</select>
</dataSource>
<link parentColumn="deptno_dept"
childColumn="deptno_emp"
condition="eq" sqlClause="where"/>
</data>
Copyright © 1984, 2005, Oracle. All rights reserved.