Charlie Lancaster (clancast@tnrcc.state.tx.us) wrote:
: How can I find a list of views that reference a given table?
This is one i use... just put your own table list in the in clause.
Hope it helps...
select distinct b.table_name,c.table_name as view_name
from iidbdepends a,
iitables b, iitables c
where
a.inid1 = b.table_reltid and
a.inid2 = b.table_reltidx and
a.deid1 = c.table_reltid and
a.deid2 = c.table_reltidx and
c.table_type = 'V' and
b.table_type = 'T' and
b.table_name in ('crttranlines','crttranaudit');
commit;
Regards
--
Cor
The Data Base Approach cc _______ Cor Winckler
PO Box 5165, Helderberg |\ | Internet: cor@itu2.sun.ac.za
7135 Somerset West | >=====| Tel: 0(+27) 21 785 1171
South Africa |/______| Fax: 0(+27) 21 881 3318
Ingres Q & A
To William's Home Page
© William Yuan 2000
Email William