title: declare variable in teradata
body: <p>In TSql I can define a variable like so:</p>
  
  <pre><code>DECLARE @Threshold AS int;
  SET @Threshold = 5;
  </code></pre>
  
  <p>I can then use it like so:</p>
  
  <pre><code>,COALESCE(
      CASE WHEN X &gt;= @Threshold THEN A ELSE NULL END
      ,CASE WHEN Y &gt;= @Threshold THEN B ELSE NULL END
  ) AS Bla
  </code></pre>
  
  <p>is something similar possible on TeraData</p>