• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1281
  • Last Modified:

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).
0
primeradmin
Asked:
primeradmin
  • 3
1 Solution
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
SELECT *
FROM YourVoterTable
WHERE UnitNum IS NOT NULL

btw, voter fraud, I'm a witness.  I'm calling the ACLU.
0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
>but, I need to exclude voters who have an apartment number (column heading: UnitNum).
{slight correction}

SELECT *
FROM YourVoterTable
WHERE UnitNum IS NULL
0
 
TWBitCommented:
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
0
 
GRayLCommented:
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);




0
 
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now