|
|
Archives of the TeradataForum
Message Posted: Fri, 14 Aug 2015 @ 19:51:51 GMT
Subj: | | Re: List of tables not accessed in 6 months |
|
From: | | Ruth Fenwick |
Roopalini,
I don't currently have access to a system with PDCR on it, but either of the following should work for want you want.
sel databasename, tablename
from dbc.tables a
left join
pdcrdata.dbqlogtbl_hst b
on a.databasename = b.databasename
and a.tablename = b.tablename
and b.logdate >= date - interval '6' months
and b.objecttype = 'tab'
where a.databasename = 'abc'
and tablekind = 't'
and a.databasename is null
order by 1,2;
or
sel databasename, tablename
from dbc.tables a
where a.databasename = 'abc'
and tablekind = 't'
and (databasename, tablename ) not in (sel databasename, tablename from
pdcrdata.dbqlogtbl_hst b
where .logdate >= date - interval '6' months
and b.objecttype = 'tab' group by 1,2)
order by 1,2;
| |