title: Declare a variable in RedShift
body: <p><code>SQL Server</code> has the ability to declare a variable, then call that variable in a query like so: </p>
  
  <pre><code>DECLARE @StartDate date;
  SET @StartDate = '2015-01-01';
  
  SELECT *
  FROM Orders
  WHERE OrderDate &gt;= @StartDate;
  </code></pre>
  
  <p>Does this functionality work in Amazon's RedShift?  From the <a href="http://docs.aws.amazon.com/redshift/latest/dg/declare.html">documentation</a>, it looks that <code>DECLARE</code> is used solely for cursors.  <code>SET</code> looks to be the function I am looking for, but when I attempt to use that, I get an error. </p>
  
  <pre><code>set session StartDate = '2015-01-01';
   [Error Code: 500310, SQL State: 42704]  [Amazon](500310) Invalid operation: unrecognized configuration parameter "startdate";
  </code></pre>
  
  <p>Is it possible to do this in <code>RedShift</code>?</p>