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

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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)
 
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)
 
Back
Top