Length

J

Jim

I have a field that has text of multiple lenght. Is tyhere a sql
select command that will only select records where the text is five
letters or less?
 
J

John Spencer

SELECT *
FROM Table
WHERE SomeField Not Like "??????*"

In the query design view enter the criteria under the field
Not Like "??????*"

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
J

John Spencer

This will return records where the field is Null.

If you need that you will need to change the criteria to
Not Like "??????*" or Is Null

SELECT *
FROM Table
WHERE SomeField Not Like "??????*"
OR SomeField is Null

'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top