title: Teradata using CAST in a JOIN statement
body: <p>I'm trying to add some fields to an existing report that runs just fine.  To add these fields, I need to join to another table.  The problem is the field is a different type on each table</p>
  
  <pre><code>Table A / FieldA = Varchar (20)
  Table B / FieldB = Decimal (19,0)
  </code></pre>
  
  <p>This is the join I have:</p>
  
  <pre><code>inner join TableA ta on ta.FieldA = b.FieldB 
  </code></pre>
  
  <p>With this join, I get a <code>SELECT Failed [3754]  Precision error in FLOAT type constant or during implicit conversions</code>.</p>
  
  <p>I'm thinking I have to use a CAST statement like this:</p>
  
  <pre><code>inner join TableA ta on ta.FieldA = cast(b.FieldB as Varchar (20))
  </code></pre>
  
  <p>When I run the report now,  I don't get any results and I'm expecting at least 1 row.</p>
  
  <p>Any help with the inner join would be greatly appreciated.  Thanks.</p>