I have 2 temp tables. One has data column wise.
OrderCode   OrderType
ABC         1000
One has data row wise
FieldName   Value
ORDER_CODE  ABC
ORDER_TYPE  2000
I need to write a query that essentially joins both of them and updates the value if it exists in table 2.
Recordset result needs to be
OrderCode  OrderType
ABC        2000
EDIT-
If there are 2 orders in table 1 with the same order code:
OrderCode   OrderType
ABC         1000
ABC     5000
the result set will need to be
   OrderCode   OrderType
   ABC         2000
   ABC         2000