We help IT Professionals succeed at work.

Access 2003 query to exclude entries in a particular column

Hey folks,

I need instruction on how to run a query wherein I can "exclude" entries from a particular column. I need to run a query to pull voters from an existing table, but, I need to exclude voters who have an apartment number (column heading: UnitNum).  I want instruction in simple terms (I'm no VB or Acess expert), no links to instructions in other Q&A's (I've already been searching and I don't want to just be redirected to other pages again).
Comment
Watch Question

Jim HornSQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015

Commented:
SELECT *
FROM YourVoterTable
WHERE UnitNum IS NOT NULL

btw, voter fraud, I'm a witness.  I'm calling the ACLU.
SQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015
Commented:
>but, I need to exclude voters who have an apartment number (column heading: UnitNum).
{slight correction}

SELECT *
FROM YourVoterTable
WHERE UnitNum IS NULL

Commented:
ha! :)

If the above SQL is too much (which you can paste into the SQL view of your query), then in Design View, add the UnitNum column and for the criteria, type in Is Null

Commented:
Exclude means if they have an apartment number don't show, or put another way - only show those which have an empty appt number.  That is done by:

SELECT * FROM Voters WHERE IsNull(UnitNum);




Jim HornSQL Server Data Dude
CERTIFIED EXPERT
Most Valuable Expert 2013
Author of the Year 2015

Commented:
Thanks for the grade.  Good luck with your project.  -Jim

Explore More ContentExplore courses, solutions, and other research materials related to this topic.