Results 1 to 3 of 3
  1. #1
    stalk is offline Competent Performer
    Windows 8 Access 2003
    Join Date
    May 2014
    Posts
    143

    How can I use not like operator with null values

    In my query I need exclude all the values in a field that starts with not like *D-* only. Some how when I run this query it's eliminating the blank values too. ((temp.[(Sup)type]) Not Like "*D-*")



    How do I explicitly add the filter to keep all blanks along with eliminating *D-*?

    Thank you so much

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    It eliminates Nulls too because a Null is definitely not like *D-*.

    Maybe a criteria like this:

    Is Null or (is not null and not like *D-* )


  3. #3
    stalk is offline Competent Performer
    Windows 8 Access 2003
    Join Date
    May 2014
    Posts
    143
    John, Changed your solution a bit and it worked perfectly. Is Null Or (Not Like "*D-*")
    Thank you so much for quick response.

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

Similar Threads

  1. Null and 0 values
    By MoeIndustries in forum Reports
    Replies: 2
    Last Post: 12-04-2015, 06:39 AM
  2. Replies: 7
    Last Post: 12-04-2013, 01:55 PM
  3. Finding the Max Date and Null Values if Null
    By SpdRacerX in forum Queries
    Replies: 1
    Last Post: 02-03-2012, 06:29 AM
  4. null values
    By ippy in forum Queries
    Replies: 3
    Last Post: 12-20-2010, 10:39 AM
  5. No return on Null values
    By forrestapi in forum Queries
    Replies: 4
    Last Post: 10-18-2010, 08:09 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