Search code examples
ms-accessselect-query

what will be the select query for excluding empty values in ms access


I am trying

select * from table where Contact Is Not null 

but it is displaying values including empty values


Solution

  • Your query is correct but probably you have zero length strings in your Contact column. You can use

    select * from table where len(Nz(Contact, '')) > 0
    

    The Nz function returns the specified default value if the column is null.