Query number of characters in a field

R

RitchieJHicks

I wish to run a query within my database where the query result is a list of
all records where the data in a particular field is more than 7 characters
long.

Can anyone advise on how I would do this please?
 
D

Dale Fye

This will cause an error if [SomeField] is NULL, so try:

SELECT *
FROM Table1
WHERE Len([SomeField] & "") >7;

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



Allen Browne said:
SELECT *
FROM Table1
WHERE Len([SomeField]) > 7;

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

RitchieJHicks said:
I wish to run a query within my database where the query result is a list
of
all records where the data in a particular field is more than 7 characters
long.

Can anyone advise on how I would do this please?
 

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