Results 1 to 5 of 5
  1. #1
    jagadeesh.rt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    3

    Smile Access : Null / Blank rows select

    Hi,


    I have created by external data from excel, while one of the column values are showing blank.



    Beginner to MS-Acces


    How can i find the column having null or values in table.
    Error : Type Conversion Failure (ImportError table)


    Query :
    Code:
    SELECT * From empdetail
    WHERE EmpId =IsNull ("")

    From the above query, not getting the result

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try this:
    Code:
    SELECT * From empdetail
    WHERE (EmpId Is Null) Or (EmpID="")

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    You want records where the field is Null or empty string?

    Other variations:

    SELECT * FROM empdetail WHERE EmpID & "" = "";

    SELECT * FROM empdetail WHERE Nz(EmpID,"") = "";
    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.

  4. #4
    jagadeesh.rt is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2014
    Posts
    3

    Data type mismatch

    Quote Originally Posted by JoeM View Post
    Try this:
    Code:
    SELECT * From empdetail
    WHERE (EmpId Is Null) Or (EmpID="")
    Hi,

    Worked with the above query, getting error like

    Data type mismatch in criteria expression

    Thank U

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Is EmpID a number type field? Then it can never have an empty string. Try just:

    SELECT * FROM empdetail WHERE EmpID Is Null;
    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.

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

Similar Threads

  1. Replies: 3
    Last Post: 06-30-2014, 12:53 AM
  2. Hide Blank Rows
    By zmbaker in forum Queries
    Replies: 1
    Last Post: 06-12-2014, 09:47 AM
  3. Code to delete the blank rows
    By drunkenneo in forum Programming
    Replies: 3
    Last Post: 02-17-2014, 09:26 PM
  4. Replies: 2
    Last Post: 02-11-2014, 11:05 PM
  5. Null field blank
    By brobb56 in forum Reports
    Replies: 3
    Last Post: 09-26-2011, 12:15 PM

Tags for this Thread

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