title: Declaring & Setting Variables in a Select Statement
body: <p>I'm attempting to write a simple query where I declare some variables and then use them in a select statement in Oracle.  I've been able to do this before in SQL Server with the following:</p>
  
  <pre><code>DECLARE @date1   DATETIME
  SET @date1 = '03-AUG-2010'
  
  SELECT U.VisualID
  FROM Usage u WITH(NOLOCK)
  WHERE U.UseTime &gt; @Date1
  </code></pre>
  
  <p>From the searching I've done it appears you can not declare and set variables like this in Select statements.  Is this right or am I mssing something?</p>