By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,392 Members | 1,576 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,392 IT Pros & Developers. It's quick & easy.

Help with Update Query

P: 8
Hi everyone. Sure it's simple, but...

Have a field "Picture" in a table. I need to change ONE word within the field across all records, but keep all the other info the same. Update query?

Example:

1/owner/123
1/owner/2354
1/owner/5634

Need to change the word "owner" to "me" in the field across all records so field reads

1/me/123
1/owner/2354
1/owner/5634

Tried using a wildcard but doing something wrong. Help! Thanks in advance for the hours you'll save me :)
Aug 6 '07 #1
Share this Question
Share on Google+
7 Replies


Rabbit
Expert Mod 10K+
P: 12,396
Don't you mean it will read:

1/me/123
1/me/2354
1/me/5634

Because that's what it sounds like you're describing.
Aug 6 '07 #2

P: 8
OOOPS yes. Last night was my birthday party - still fuzzy I suppose :)
Aug 6 '07 #3

Rabbit
Expert Mod 10K+
P: 12,396
Try an Update Query and set the field = Replace(FieldName, "owner", "me")
Aug 6 '07 #4

P: 8
Embarrassed, but I'm not sure I know how to do what you recommend. I'm using the design grid. Should I use the SQL view? (When I say I'm a newbie...:)

I opened a new query, design view. Got the table on the grid. Put the field "Picture" in the query fields. Changed it to an Update Query. Got a new line that says "Update To". That's as far as I got before where I was trying to use wildcards. Where do I "set" the field to equal =Replace....etc.?

Sorry! You guys are awesome that you give your time like this. It's a hard start for us beginners. Many thanks.
Aug 6 '07 #5

Rabbit
Expert Mod 10K+
P: 12,396
In the Update to, paste this:
Replace([Picture], "owner", "me")
Aug 6 '07 #6

P: 8
Wait....yeah, I got it! I went into SQL view and it made much more sense. Tried it. Works like a gem. Thank you so very much.
Aug 6 '07 #7

Rabbit
Expert Mod 10K+
P: 12,396
Not a problem.
Aug 6 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.