title: character_length Teradata SQL Assistant
body: <p>I have to run column checks for data consistency and the only thing that is throwing off my code is checking for character lengths for dates between certain parameters.</p>
  
  <pre><code>SEL
  sum(case when ( A.date is  null or (character_length(A.date) &gt;8)) then 1 else 0 end ) as Date
  from
  table A
  ;
  </code></pre>
  
  <p>The date format of the column is YYYY-MM-DD, and the type is DA.  When I run the script in SQL Assistant, I get an error 3580 "Illegal use of CHARACTERS, MCHARACTERS, or OCTET_LENGTH functions."</p>
  
  <p>Preliminary research suggests that SQL Assistant has issues with the character_length function, but I don't know how to adjust the code to make it run.</p>