Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IDENTIFYING AND UPDATING TEXT FIELDS WITH * PART NUMBERS

Status
Not open for further replies.

slapupp

Technical User
Aug 30, 2001
14
0
0
US
I have a data table with a "part number" field populated as follows:

Part Number
101
101*
101c
107bc
107bc*
107c

The asterisk at the end of a part designates that the part is a retail part. For example, a 101* is the same base part as a 101 (a 101c is a completely different part). What I would like to do is identify the base parts for all asterisk parts and update a new field with the base part. I can then summarize the demand for the base part (which is my goal).

Any suggestions would be greatly appreciated.

Mike
 
So basically what you want to do is strip the last character if it's an asterisk? Simple enough if I've understood you correctly:

BasePart: IIf(Right([Part Number],1)="*",Left([Part Number],Len([Part Number]-1)),[Part Number])

HTH Joe Miller
joe.miller@flotech.net
 
If this data is in a database, you can get all the records with an astrick marker using an SQL statement like this:

SELECT * FROM tblParts WHERE PartModel LIKE '%*' ORDER BY PartModel

This will return anything that has this format --

123*
abc*

but not items like this

*123
ab*c James Lindën
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top