Query to Populate a Field with Part of Contents from Another Field

G

Guest

Using Access 2003, I need to populate a Domain field which is currently
blank. The information already exists as part of the Email address field. Is
there any way to build an update query expression that would, for example,
populate field with company.com if the Email address is (e-mail address removed)?
I have 140,000+ records, so cannot parse on the @ sign in Excel. I suppose I
may have to do this, but I am hoping Access has a way. Any ideas or help
greatly appreciated. Thank you.
Annie
 
A

Allen Browne

Use Instr() to locate the @, and Mid() to get the rest of the string.

In a fresh column of the Field row in query design, you will end up with
something like this:
Mid((e-mail address removed)
 
G

Guest

Allen, thank you so much. I ran an update query and this worked perfectly! I
never used Instr before. You have saved me hours of work. Again, thank you.
Annie

Allen Browne said:
Use Instr() to locate the @, and Mid() to get the rest of the string.

In a fresh column of the Field row in query design, you will end up with
something like this:
Mid((e-mail address removed)
 

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