title: update corresponding value from other table
body: <p>I have two tables named sales and login.My table structure is given below.Some times my program update the custid instead of userid in sales table column userid, but the logid updated correctly in sales table. I have the another table tbl_log shown below. I want to update the sales table userid based on logid using the tbl_log. </p>
  
  <h1>sales table</h1>
  
  <pre><code>Fld_id  Fld_cust_id Fld_log_id  Fld_amount  Fld_user_id
  1   S1002   101 100 d2121
  2   S1003   102 121 S1003
  3   S1004   103 120 d2123
  4   S1005   102 130 d2122
  5   S1006   102 1234    S1006
  6   S1007   102 111 d2122
  7   S1008   103 21  d2123
  8   S1009   103 234 S1009
  9   S1010   104 31  d2124
  10  S1011   104 60  S1011
  </code></pre>
  
  <h1>Log Table</h1>
  
  <pre><code>Fld_log_id  Fld_user_id
  101 d2121
  102 d2122
  103 d2123
  104 d2124
  </code></pre>
  
  <h1>Exact output</h1>
  
  <pre><code>Fld_id  Fld_cust_id Fld_log_id  Fld_amount  Fld_user_id
  1           S1002           101         100         d2121
  2           S1003           102         121         d2122
  3           S1004           103         120         d2123 
  4           S1005           102         130         d2122
  5           S1006           102         1234            d2122
  6           S1007           102         111         d2122
  7           S1008           103         21          d2123
  8           S1009           103         234         d2123
  9           S1010           104         31          d2124
  10          S1011           104         60          d2124
  </code></pre>