How do I get rid of extra alphas & numerics in front of my parts l

G

Guest

Hi,

I have a parts list that contains this in most of the Part No field, Table
14: DR 1421. I would like to get rid of the Table 14: part that is contained
in all most all the records. How do I this with out erasing each one
individually?

Thanks Dustin
 
G

Guest

If you always have a common delimiter then you can determine the position and
extract what you need.

IE:
StrPartNo = "Table 14: DR 1421"
Right(StrPartNo,Len(StrPartNo)-Instr(StrPartNo,":"))
 
G

Guest

If you want to completly eliminate the prefix info, you could also run an
update query on the underlying table.
 
G

Guest

Hi,

If the 14: never repeat, it only apear in the beginning, you can use the
Replace function to remove it

Replace([FieldName],"14:","")

***** In any case, if you goig to update your data, create BACK UP first
******
 
G

Guest

Sorry,

Replace([FieldName],"Table 14:","")
--
Good Luck
BS"D


Ofer Cohen said:
Hi,

If the 14: never repeat, it only apear in the beginning, you can use the
Replace function to remove it

Replace([FieldName],"14:","")

***** In any case, if you goig to update your data, create BACK UP first
******


--
Good Luck
BS"D


Dustin said:
Hi,

I have a parts list that contains this in most of the Part No field, Table
14: DR 1421. I would like to get rid of the Table 14: part that is contained
in all most all the records. How do I this with out erasing each one
individually?

Thanks Dustin
 
J

John W. Vinson

Hi,

I have a parts list that contains this in most of the Part No field, Table
14: DR 1421. I would like to get rid of the Table 14: part that is contained
in all most all the records. How do I this with out erasing each one
individually?

Thanks Dustin

Is there any variation in these? Is it always Table 14: or might it be Table
12: or Table 32: sometimes? Can you count on the colon being present?

If a) you want to edit only those values that start with the word Table and
contain a colon and b) replace "Table 14: DR 1412" with "DR 1412" then:

- Back up your database (update queries are irreversible!)
- Create a Query based on your table with a criterion on Part No of

LIKE "Table*:*"

and see if it is retrieving just those records you want to edit

- Change the Query to an Update query using the query tool
- On the Update To line under Part No put

Trim(Mid([Part No], InStr([Part No], ":") + 1))

Run the query by clicking the ! icon.

John W. Vinson [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

Top