Query Number Of Character

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
 
D

Dirk Goldgar

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.
 
A

Allen Browne

In query design, enter an expression like this in the Field row:
Len([ID])

In the Criteria row beneath that:
< 10
 
L

Larry Linson

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
Grouping Names in Mail Merge 0
Outlook 365 overriding formatting choices 0
Top 20 1
Special characters 3
Adding sequence numbers to paragraphs 0
Running Sum In Query 2
Problem With Null 6

Top