Results 1 to 2 of 2
  1. #1
    MsAxes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2021
    Posts
    100

    How to only return rows with missing data in any columns?

    Greetings - I have a data table (real table has up to 30 columns & up to 10k records) where I am only interested in keeping the rows that where any column has no value. I have a delete query (see SQL below) that returns a data type mismatch in criteria expression but I can't see why.

    Code:
    SELECT Data.Customer_Type, Data.Name, Data.Open_Date, Data.Balance, Data.Account_Num, Data.Test_2, Data.Test_3, Data.Test_4FROM Data
    WHERE (Data.Customer_Type<>"" And Data.Name<>"" And Data.Open_Date<>"" And Data.Balance<>"" And Data.Account_Num<>"" And Data.Test_2<>"" And Data.Test_3<>"" And Data.Test_4<>"");
    Can someone take a look and let me know what I'm missing?



    A successful query should only keep John Doe and Jane Sow. Other rows should be removed because no columns are missing data.

    I just realized that I did not save the query as a 'Delete' query - I test out under 'Select' before I switch query type.
    Attached Files Attached Files

  2. #2
    MsAxes is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2021
    Posts
    100
    Just figured it out - the non 'Text' data types required Is Not Null instead of <>"".

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

Similar Threads

  1. Replies: 15
    Last Post: 09-18-2020, 09:59 AM
  2. Rows with missing data are not shown. Why?
    By yellowgelb in forum Queries
    Replies: 2
    Last Post: 04-09-2015, 05:06 AM
  3. Replies: 3
    Last Post: 09-06-2014, 01:25 PM
  4. Replies: 1
    Last Post: 07-14-2012, 01:37 AM
  5. Missing columns by getting External data
    By Roncancio in forum Access
    Replies: 10
    Last Post: 04-26-2012, 11:46 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