title: Inserting into a table with a character limit
body: <p>I am trying to insert into a table, but keep on getting a character limit error. When I try to limit the characters in my secondary table using the LEFT function under SELECT, I get another error. Is there a way for me to limit the number of characters? Here is the outline:</p>
  
  <pre><code>insert into PrimaryTable
  select
      D.Year,
      LEFT(D.Product_ID,5),
      LEFT(SUM(D.SALES),5) as SALES,
      LEFT(SUM(D.UNITS),5) as UNITS
  from DataTable D
  where UNITS &lt;&gt; 0
  group by 1,2;
  </code></pre>
  
  <p>EDIT: Changed D.SUM(SALES) to SUM(D.SALES), still receiving the error.</p>