Select A Character In A Part #

D

Dmario

Our part numbers are 10 or 11 Characters in length. I need to select the 8th
character in the part number which denotes the parts color to do some
analysis. How can I select this 8th character based on what it is. For
instance if the 8th character is an alpha it tells me what color it is, but
if it is numeric it is black, clear, or white. I want to select the colors.

Any help would be greatly appreciated.
 
J

John W. Vinson

Our part numbers are 10 or 11 Characters in length. I need to select the 8th
character in the part number which denotes the parts color to do some
analysis. How can I select this 8th character based on what it is. For
instance if the 8th character is an alpha it tells me what color it is, but
if it is numeric it is black, clear, or white. I want to select the colors.

Any help would be greatly appreciated.

Put a calculated field in a Query:

ColorCode: Mid([partnumber], 8, 1)

You may want to have a small Colors table with values for all the valid color
letters or digits (bear in mind that "3" is a character too, just because it's
a digit doesn't mean you need to interpret it numerically).
 

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