Simple Query

C

carl

I have a field maned Group. The field contains 2 alpha characters eg: AB,DE,XC

I would like to build a query that will extract groups that start with
letters between A and L.

Is this possible ?

Thank you in advance.
 
M

Mike Labosh

I have a field maned Group. The field contains 2 alpha characters eg:
AB,DE,XC

I would like to build a query that will extract groups that start with
letters between A and L.

SELECT *
FROM Group
WHERE Left$(ColumnName, 1) BETWEEN "A" AND "L"

--
Peace & happy computing,

Mike Labosh, MCSD

"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane
 
R

Rick B

Sure. Just fill in the criteria like the following....


Like "a*" or Like "b*" or Like "c*" etc...
 
F

fredg

I have a field maned Group. The field contains 2 alpha characters eg: AB,DE,XC

I would like to build a query that will extract groups that start with
letters between A and L.

Is this possible ?

Thank you in advance.

Group is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

To answer your question, after you change the field name to something
else set the query criteria to:
Left([FieldName],1) In ("A","B","C","D",.....,"L")
 
F

fredg

I have a field maned Group. The field contains 2 alpha characters eg: AB,DE,XC

I would like to build a query that will extract groups that start with
letters between A and L.

Is this possible ?

Thank you in advance.

Group is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

To answer your question, after you change the field name to something
else set the query criteria to:
Left([FieldName],1) In ("A","B","C","D",.....,"L")

A even simpler criteria would be:

Left([FieldName],1) < "M"
 
Top