Counting Digits

T

Tony

Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T
 
F

fredg

Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T

Len([PN])
will return the total number of characters in the field.
Len(5632) = 4

If you mean to count only the numbers in a field that also includes
letters ("AXH82897") , you'll need to write your own user defined
function.
Post back if you need help in doing that.
 
T

Tony

Thanks Fred!


-----Original Message-----
Good Morning,

Is there a way to count the number of digits within a
field in a query? Example: We have a field call PN (Part
Number) and the Part Number could be of 6 to 8 digits
long. Would like a an expression/calculated field that
would count the values. Any insite would be appreciated.

-T

Len([PN])
will return the total number of characters in the field.
Len(5632) = 4

If you mean to count only the numbers in a field that also includes
letters ("AXH82897") , you'll need to write your own user defined
function.
Post back if you need help in doing that.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 

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