Can I add to a current update query? Or do I have to make another?

S

Sarah

I currently already have an update query that replaces the inches mark
(") with nothing. If I need to replace another column in a table, can
I use the same update query?

This is what I need to update....
I have data from table 1 that I am trying to join with table 2. Some
(not all) of the data from table 1 has a suffix ("SR" or "TR") at the
end of it thats not allowing it to join correctly.

How do I get rid of the "SR" and "TR"?

Example..
Table 1 has information that looks like this: KL42SR or ME42TR
I want my data to look like this: KL42 or ME42


Not all data has this ending, and so I cant just delete the last 2
characters to the right.

Is there a way to write a Replace statement that will get rid of both
"SR" and "TR"?

Replace([Table 1]!Grade,"SR","") did not work.
 
J

John W. Vinson

I currently already have an update query that replaces the inches mark
(") with nothing. If I need to replace another column in a table, can
I use the same update query?

This is what I need to update....
I have data from table 1 that I am trying to join with table 2. Some
(not all) of the data from table 1 has a suffix ("SR" or "TR") at the
end of it thats not allowing it to join correctly.

How do I get rid of the "SR" and "TR"?

Example..
Table 1 has information that looks like this: KL42SR or ME42TR
I want my data to look like this: KL42 or ME42


Not all data has this ending, and so I cant just delete the last 2
characters to the right.

Is there a way to write a Replace statement that will get rid of both
"SR" and "TR"?

Replace([Table 1]!Grade,"SR","") did not work.

See my reply in the other thread if you want to actually permanently REMOVE
the suffix; but to just suppress it for the purpose of the join, use

Replace(Replace([Table 1].Grade, "SR", ""), "TR", "")

Note that table.field references should use a period not an exclamation mark
as delimiter.
 
S

Sarah

I currently already have an update query that replaces the inches mark
(") with nothing. If I need to replace another column in a table, can
I use the same update query?
This is what I need to update....
I have data from table 1 that I am trying to join with table 2. Some
(not all) of the data from table 1 has a suffix ("SR" or "TR") at the
end of it thats not allowing it to join correctly.
How do I get rid of the "SR" and "TR"?
Example..
Table 1 has information that looks like this: KL42SR or ME42TR
I want my data to look like this: KL42 or ME42
Not all data has this ending, and so I cant just delete the last 2
characters to the right.
Is there a way to write a Replace statement that will get rid of both
"SR" and "TR"?
Replace([Table 1]!Grade,"SR","") did not work.

See my reply in the other thread if you want to actually permanently REMOVE
the suffix; but to just suppress it for the purpose of the join, use

Replace(Replace([Table 1].Grade, "SR", ""), "TR", "")

Note that table.field references should use a period not an exclamation mark
as delimiter.
--

             John W. Vinson [MVP]- Hide quoted text -

- Show quoted text -

I just tried Replace(Replace([Table 1].Grade,"SR",""),"TR","") and it
didnt work either.
 
J

John W. Vinson

I just tried Replace(Replace([Table 1].Grade,"SR",""),"TR","") and it
didnt work either.

"didn't work" is a bit vague. What happened?

Is Grade perchance a Lookup field (in which case it just contains a numeric
ID, and no SR or TR at all)?
 

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