Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trying to count number of records where certain columns are populated

852343Aug 4 2011 — edited Aug 4 2011
Using SQL in Toad against an Oracle table, I'm trying to count the number of records in a table where certain columns are populated. For
example, I need to know the total count of records from a table where

ln_stop_cd is not null --65000 records
ln_process_cd is <> 0 --25000 records
ln_opt_cd is not null --7500 records

and the record_type = 'A'

I know the individual total of the records as shown above. However, I'm not sure how to do
the SQL to show for record_type = 'A' the total count is 97500 records. Any help would be
appreciated.
This post has been answered by Frank Kulash on Aug 4 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 1 2011
Added on Aug 4 2011
6 comments
2,379 views