Results 1 to 3 of 3
  1. #1
    pharmacologist is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Oct 2019
    Posts
    39

    Possible to select all/only columns that do not contain null values where some column = value?


    I have a table with almost 100 columns and an assortment of fields that are null for some records. I'd like to be able to select all the records based on a criteria value and have it return the columns/fields that are not null across all the matching records. This way I can populate a table with all the relevant fields for the matching records but not have fields where every record is null. Does that make sense and if so is it possible? I'd really like to avoid having to avoid doing this for every specific column where as I said there are almost 100

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    This would require a bunch of VBA.

    Sounds like data structure is not normalized. More like a spreadsheet.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Suggest you tell us more about the application and the table(s) involved. As June said -it sounds like a data structure issue - but we don't know the details. A table with 100 columns is quite rare.

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

Similar Threads

  1. Replies: 2
    Last Post: 04-18-2019, 12:34 PM
  2. Select rows with null values
    By jabarlee in forum Queries
    Replies: 15
    Last Post: 10-21-2018, 11:58 AM
  3. Select only column with not null fields
    By ezybusy in forum Forms
    Replies: 7
    Last Post: 10-18-2017, 11:42 AM
  4. Replies: 1
    Last Post: 12-20-2012, 11:03 AM
  5. Replies: 1
    Last Post: 11-03-2011, 01:07 AM

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