title: Casting to decimal in Teradata/SQL
body: <p>I'm trying to cast a line in a (Teradata) SQL query so I can get decimals:</p>
  
  <pre><code> (SUM((vndr_po_ln_vb.mnfst_qty - vndr_po_ln_vb.rcvd_qty)))/(CAST(COUNT(DISTINCT vndr_po_vb.vndr_po_num)) AS DECIMAL(3,2))  AS "Average Damaged Cases per PO"
  </code></pre>
  
  <p>However, it seems that it it throwing back an error:</p>
  
  <pre><code>Syntax error: expected something between ')' and ')'.
  </code></pre>
  
  <p>Am I correctly casting this line of code?</p>