I have a simple question Im sure. I just cant figure it out today. I
want to list all tables in the database that contain two fields that I
specify. For example, I want all tables that have the custid and
transnbr field. Can someone help me on the sql for it? Below is an
example of what I am trying to do, but the query takes so long, I am
sure there is a better way.
WHERE tbl.Table_Name = fld.Table_Name
AND (fld.Column_Name = 'KCM_TRANS_NBR'
OR fld.Column_Name = 'CUST_ID')
HAVING Count(fld.Column_Name) > 1;
Thanks in advance,
Crystal L. Cope
Sent via Deja.com http://www.deja.com/
Before you buy.