Query Number Of Character

  • Thread starter Thread starter zyus
  • Start date Start date
Z

zyus

I hv this sample of record in my ID field.

ID
A12345
777777777777
L324554

Q. How to query those ID which is less than 10 character?

TQ
 
zyus said:
I hv this sample of record in my ID field.

ID
A12345
777777777777
L324554

Q. How to query those ID which is less than 10 character?


Try this SQL:

SELECT * FROM YourTable WHERE Len(ID) < 10

That assumes that ID will never be Null.
 
In query design, enter an expression like this in the Field row:
Len([ID])

In the Criteria row beneath that:
< 10
 
zyus said:
I hv this sample of record in my ID field.

ID
A12345
777777777777
L324554

Q. How to query those ID which is less than 10 character?

The Criteria Line of the ID Field in the Query Builder should be:

Len([ID]) < 10

Larry Linson
Microsoft Office Access MVP
 

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

Similar Threads

Partial Record Deletion 5
Top 20 1
Special characters 3
Running Sum In Query 2
COPY RECORD 3
Problem With Null 6
Default Date Value 1
Data Patch By Batch 1

Back
Top