select records where first letter of name begins with an a through

  • Thread starter Thread starter JK
  • Start date Start date
J

JK

I'm trying to create a chart but I have too man names. I want to limit the
query to names that begin with an A through M - then create a separate query
for names that begin with M though Z. That way, I can have two reports that
display the data properlly.

Any idea how I would limit the query data based on the first letter of each
person's name? I also need to incorporate the greater than / less than
restriction.

Thanks,
 
SELECT Employees.*
FROM Employees
WHERE Left([LastName],1) Like "[A-N]" ;

SELECT Employees.*
FROM Employees
WHERE Left([LastName],1) Like "[M-Z]" ;
 
Use the following expressions in your query as criteria under the name field.

For a to m use
LIKE "[A-M]*"

And for n to z
LIKE "[N-Z]*"

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top