I have about 36 archive tables that are written to by other tables' triggers. Each of my archive tables begins with "LOG_". I am trying to develop a query that will show the count and last mod date of each table (I have a data element in each LOG table "mod_date".
First I am running one query:
select table_name
from dba_tables
where table_name like 'LOG_%'
order by table_name;
then I must run a second query:
select count(*) as count,
max(mod_date) as last_mod_date
from " & rsL("table_name"
(rsL("table_name" is the recordset value from the first query; I run the second query in a loop, getting each table name from the first query.)
I can't figure out how to combine them into one query.
I want to make the first query as a subquery in Query 2
but I can't figure out how to use a table name returned from a query. Does that make sense?
Thanks if anyone has any advice;
Nelson
First I am running one query:
select table_name
from dba_tables
where table_name like 'LOG_%'
order by table_name;
then I must run a second query:
select count(*) as count,
max(mod_date) as last_mod_date
from " & rsL("table_name"
(rsL("table_name" is the recordset value from the first query; I run the second query in a loop, getting each table name from the first query.)
I can't figure out how to combine them into one query.
I want to make the first query as a subquery in Query 2
but I can't figure out how to use a table name returned from a query. Does that make sense?
Thanks if anyone has any advice;
Nelson