Updating one column based on reference values in the same table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • virgo0984
    New Member
    • Aug 2014
    • 1

    Updating one column based on reference values in the same table

    Hi, I have a table 1 with the following values:
    ITEM LOCATION SS_DAYS
    316TA/JP415 052 21
    316TA/JP415 062 0
    316TA/JT266 052 43.17
    316TA/JP415 062 0

    I have table 2 with the relationship between item and location from table 1. That table reads as follows
    Original SKU Loc_ORG Replacement_SKU Repl_LOC
    316TA/JP415 052 316TA/JT266 052
    316TA/JP415 062 316TA/JT266 062

    I want to use Table 2 to replace the values of Original SKU/Location with value sof Replacement SKU/location in Table 1. Thus, my results in Table 1 after updating should look like this

    ITEM LOCATION SS_DAYS
    316TA/JP415 052 43.17
    316TA/JP415 062 0
    316TA/JT266 052 43.17
    316TA/JP415 062 0
Working...