An interactive grid has to use a sql-query as source.
a. Write one query and use sql-query as source:
SELECT * FROM A
UNION ALL
SELECT * FROM B WHERE COUNT(SELECT * FROM A) = 0;
b. Write some function which does the work
Read this:
How to return a resultset / cursor from a Oracle PL/SQL anonymous block that executes Dynamic SQL?
But it sounds a little bit strange, that you got one grid for two datasources. This will bring up some problems when manipulating the data.
Open questions
- Do you want to modify the data?
- Do you want to insert new rows?
- Does the user understand what's going on and what he is seeing?
[apex]
. I meant to delete my comment by I got distracted. ;-) Still, more clarity is only a good thing. – APC