Re: Column Count in Table
From: Saad Ahmad <sahmad_at_mfa.com>
Date: 25 Mar 1995 00:42:09 GMT
Message-ID: <3kvot1$ev7_at_homer.alpha.net>
where <the condition to select not-null cols>;
Date: 25 Mar 1995 00:42:09 GMT
Message-ID: <3kvot1$ev7_at_homer.alpha.net>
Lee Parsons (lparsons_at_eskimo.com) wrote:
> The Data Dictionary Policeman just left my office and wants a report that
> lists a count of non-null values for a particular table. Of course what he
> is looking for is obsolete columns and if i give it to him his next request
> will be for a report on ALL tables.
> Thoughts?
Using cols table.
write a sqlplus script to spool out the sql scripts from the cols tabls.
eg, (something like)
select
'select count(*) from '|| c.table_name || ' where ' || c.column_name || ' is not null;'from cols
where <the condition to select not-null cols>;
then call that script.
-- ************************************************************** * Saad Ahmad * * E-Mail: sahmad_at_mfa.com * **************************************************************Received on Sat Mar 25 1995 - 01:42:09 CET