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
 
Top