title: How to resolve MySQL Error Code: 1292. Truncated incorrect DOUBLE value?
body: <p>I'm trying to update 2 different tables with an update query as shown below</p>
  
  <pre><code>UPDATE  db1.table1 a, db2.table1 b 
  SET       b.firstname  =  a.firstname,
            b.lastname   =  a.lastname,
            b.address    =  a.address,
            b.state      =  a.state,
            b.city       =  a.city,
            b.zip        =  a.zip             
  
  WHERE a.stud_id=b.stud_id AND a.firstname IS NOT NULL AND b.firstname IS NULL
            AND str_to_date(a.joindate,'%m/%d/%Y') &gt;= str_to_date('02/01/2012','%m/%d/%Y');
  </code></pre>
  
  <p>but when i tried to execute this query, MySQL kept throwing the following error</p>
  
  <pre><code>Error Code: 1292. Truncated incorrect DOUBLE value: 'CROUGH0000'
  </code></pre>
  
  <p>Though i've found much similar posts in stackoverflow, i couldn't find the exact solution to this problem. </p>
  
  <p>Need some help. Thanks in advance</p>
  
  <hr>
  
  <p>EDIT : Datatypes of each column are as follows</p>
  
  <pre><code>              b.firstname(varchar(25))  =  a.firstname(varchar(52)),
                b.lastname(varchar(25))   =  a.lastname(varchar(35)),
                b.address(varchar(40))    =  a.address(varchar(50)),
                b.state(char(2))      =  a.state(char(2)),
                b.city(varchar(25))       =  a.city(varchar(25)),
                b.zip(varchar(11))        =  a.zip(varchar(11))
  </code></pre>