title: Update table from converted value in another table
body: <p>I'm trying to compare between an int value and a converted (varchar to INT) value in one table to find a value in another table then update it through phpmyadmin.</p>
  <p>comment table</p>
  <pre><code>id: 1   title:Lorem   postID: 15 
  </code></pre>
  <p>meta table</p>
  <pre><code>ID:99   NewID: 123 Type: &quot;older_id&quot;   Value:&quot;15&quot;
  </code></pre>
  <p>SQL</p>
  <pre><code>update t1
  set t1.postID = t2.NewID
  from comment t1
  inner join meta t2
  on t1.postID = CAST(t2.value AS INT)
  where t2.Type = &quot;older_id&quot;;
  </code></pre>
  <p>I'm not sure what i'm doing wrong but i keep getting an error.</p>