Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2007

    Unhappy Unanswered: Implementing something similiar to a "Replace Function"

    Good Evening Gentlemen,
    This being my first post please excuse any ignorance you may see in my question below. I dont want to be long winded about it but I want to be sure to give you as much info as possible.

    I am working admin in the Marine Corps and it is my 'Sections' particular responsibility to Deploy Marines and provide administrative "reach back" for them while they are "forward" (deployed overseas) wherever they may be. The majority of this is done through email (Outlook 2003). There being other Sections within my "shop" it is my job, among other things, to disseminate the Email to the other sections and ensure timely action on it. Bringing a bit of order to chaos, I have created a Database (MS Access 2003) to track it.

    I have a table that is indirectly linked, through both Update and Append Queries, to our Inbox and Outbox. After a bit of tweaking this is working rather smoothly, however I have an issue with a certain bit of information. In one particular column, "Section Concerned" of our "Main Table" we have stored the email address of the Section we had sent the email to. An example of this would be:

    Main Table
    Section Concerned

    I have an issue with this, as this information is to "raw" (crude), and would like to have instances of this replaced with something alot simpler like "Pay" or "Legal". Having taught myself how to do everything through trial & error from the ground up, to this point, I am not to sure that the "Replace" function or how to even go about this. I am open to any Ideas or solutions you may have for this and your help would be VERY appreciated.

    I need to replace instances of "EMAIL ADDRESS PAY" to "PAY" on the "Main Table"

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Take a back up of all your data...

    THEN try an update query
    UPDATE mainTable
    SET    sectionConcerned = LTrim(RTrim(Replace(sectionConcerned, "EMAIL ADDRESS", "")))
    I've added the Trim functions to remove leading and trailing spaces from the result too.
    Home | Blog

  3. #3
    Join Date
    Dec 2007
    I will give it a try THANK YOU..
    Last edited by POGMarine; 12-05-07 at 10:00.

  4. #4
    Join Date
    Dec 2007

    The Ignorant part

    Got it thanks for your help.
    Last edited by POGMarine; 12-05-07 at 13:02.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts