UPDATE field with data from another table - where another field matches...!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webcat
    New Member
    • Jun 2007
    • 13

    UPDATE field with data from another table - where another field matches...!

    Hi

    I need to UPDATE data into a table
    mainData

    which contains many fields - one is CODE and one is DESCRIPTION

    another table DESCRIP is a lookup - it also contains the same fields, but each is populated.

    i need to run through all records and UPDATE the DESCRIPTION field in mainData based on matching CODE in mainData with CODE in DESCRIP

    I'm kinda new to SQL - i'm sure this is easy but i'm just not yet able to see how to write the query!

    thanks for any help.!


    Using Access 2003
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Have you tried the query builder? It makes things a lot easier.

    Comment

    • Gerhard
      New Member
      • Feb 2007
      • 23

      #3
      Hi

      I have the same problem. My Update Query only Lookup the first value and puts the result in all updated records, instead of looking up the value for each record that needs to be updated.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Gerhard, please post your question in a new thread.

        Comment

        Working...