Count of float and integer datatypes that are not default of 0.00 and 1

  • Hi -

    I'm doing a report that shows the percentage of fields in several tables that are populated.  The varchar columns are working fine, but not the integer, default 1, or float, default 0.  No matter what I try I am still getting the defaults counted. 

    Any help would be appreciated.

    Thanks,

  • Replace default values with NULL. As it should always be.

    COUNT does not take NULLs.

    _____________
    Code for TallyGenerator

  • Hi -

    Thanks -

    I can't change the application defaults.  Can I include something in the query that will effectively do the same thing? 

  • NULLIF(ColName, )

    _____________
    Code for TallyGenerator

  • Thanks so much, Sergiy - exactly what I need!  Really appreciate it.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply