title: Using a variable for a date range in Oracle SQL Developer
body: <p>How can I alter the code below to get a date range as opposed to one day? Code 1 works, code 2 doesn't (I'm using Oracle SQl Developer)</p>
  
  <p><strong>CODE 1</strong></p>
  
  <pre><code>DEFINE date1 = '01-JUN-17' 
  SELECT * 
  FROM   op_all_appointments OP 
  WHERE  OP.ATTENDANCE_DTTM = '&amp;&amp;date1'
  </code></pre>
  
  <p>I tried the below, but it doesn't work? It returns data for the 1st June 2017 only</p>
  
  <p><strong>CODE 2</strong></p>
  
  <pre><code>DEFINE date1 between '01-JAN-17' and '30-JUN-17'
  SELECT * 
  FROM   op_all_appointments OP 
  WHERE  OP.ATTENDANCE_DTTM = '&amp;&amp;date1'
  </code></pre>
  
  <p>Thank you</p>