displaying data from more than one table in ADF table

Problem Statement –

How to display data from more than one table in to AF:Table.

There are EOs based on tables EmpEO, DeptEO and i would like to display a table with,

Emp Name, Emp Manager Name and Emp Department Name.

Emp Manager Name can be taken from inner join with EMP Table.

Emp Department Name can be taken from DeptEO with Left Join.

Solution –

1. Create a VO based on two EO i.e. EmpEO and DeptEO.

2. Update VO Query as,

Select E.EmpName,
E1.ManagerName,
D.DeptName
From Emp E, Emp E1, Dept D
Where
E.EmpId = E1.EmpId AND
E.DeptId = D.DeptId(+)

3. Drag VO from Data Control and create table.

Enjoy.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s