Results 1 to 2 of 2
  1. #1
    chrisfl is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Location
    Minnesota
    Posts
    13

    Query to figure out null cells.

    Another team in my organization wants to see where null spots are in their database. The table that this information would come from has a number of fields which have been filled in sporadically - they want to know how many unknowns are out there. Is there a way to design a query to figure this out? I would like to tell my team something like:

    Field X is null in 30 out of 100 total records, or 30%

    Field Y is null in 20 out of 100 total records, or 20%

    Field Z is null in 50 out of 100 total records, or 50%



    Thanks!

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,641
    This type of thing should give you the raw numbers:

    SELECT Sum(IIf(FieldX Is Null, 1, 0)) AS NullFieldX, Sum(IIf(FieldY Is Null, 1, 0)) AS NullFieldY, Count(*) AS TotalRecords
    FROM TableName

    I'd do the division in a report.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 05-09-2012, 05:27 PM
  2. Replies: 1
    Last Post: 02-23-2012, 02:27 PM
  3. Can't figure out Access query
    By luderbeck1 in forum Queries
    Replies: 3
    Last Post: 02-02-2012, 12:12 PM
  4. Need a query to figure all possible combinations
    By julestrip in forum Queries
    Replies: 1
    Last Post: 05-27-2011, 07:23 AM
  5. Cannot Figure this query out
    By ryan1313 in forum Queries
    Replies: 6
    Last Post: 08-13-2010, 12:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums