Replacing Chars

G

Guest

I am trying to replace chars in field without replacing all the chars. I
have many fields in Member TBL called MbrName. The data will have many
different values with the chars #### embedded in the name .ie BC1D#### or
BCP.FIle###.Daily ect. I need to run a query that promps for a user number
and have the #### replaced with the user number entered. I am setting up a
table that is a model. The query will select all the records on this table,
replace all #### with the users number and then insert them in a second table
used to create reports.
help!
 
R

Rick B

Steve:

You have an answer to this in the thread you posted yesterday. If that
solution does not work, go post to that thread and exaplin why it won't work
for you.
 
J

Jeff Boyce

Steve

Without some idea of how your data is structured, it's a bit tough offering
suggestions.

Are you saying that you have "user numbers" embedded along with other
symbols in a single field? If so, you are encountering one of the reasons
doing this is NOT a good idea -- the basic premise is "one fact, one field".
Do you actually have Fact1 ("BC1D") and Fact2 (####) combined in a single
field, or are you using two fields and a query to concatenate them for
display purposes?
 
G

Guest

Here's the situation......I have a database where many users(100) enter
datatsets, sort members,pgm names, jcl members to be moved to production. I
have one user that always enters the same data everytime except for 4
numerics that is embedded in the member names. There are bout 50 members
that he has to key everytime. I am try to set up a model database with all
the members that he needs to populate the primary datase where all that he
has to do is enter the user number and that number will replace all the ####
in the member names.
 
J

Jeff Boyce

Steve

You described the process, I asked about the data structure.

What's your data structure?
 
G

Guest

It's defined as a text field length 25.

Jeff Boyce said:
Steve

You described the process, I asked about the data structure.

What's your data structure?

--
More info, please ...

Jeff Boyce
<Access MVP>
 
J

Jeff Boyce

Steve

I'm not sure I can offer much assistance on this. Perhaps if you re-posted,
other 'group readers could better understand.

(When I asked about data structure, I was seeking an overall picture.
You've describe one data element and its data type.)
 
D

Douglas J. Steele

Assuming that the data has the four characters #### embedded as a
placeholder, you should be able to use the Replace function in your query
along the lines of:

SELECT Field1, Field2, Replace([Field3], "####", [MbrName])
FROM MyTable
 

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