title: Hibernate createQuery() for Date_add
body: <p>I am trying to implement the following SQL query in hibernate HSQL. Instead of value '7' I have to pass a dynamic value 'delivery'.</p>
  
  <pre><code>SELECT quote_key , delivery_date 
    FROM Orders 
    WHERE delivery_date &gt;= DATE_ADD(now(), INTERVAL '-7' DAY); 
  </code></pre>
  
  <p>DAO Layer:</p>
  
  <pre><code>String sql = " FROM Orders where deliveryDate &gt;= DATE_ADD(now(), INTERVAL -(:delivery) " + " DAY)";
  
  Query query = session.createQuery(sql);
  query.setParameter("delivery", delivery);
  List&lt;Orders&gt; mergedData = query.list();
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>unexpected token: DAY</p>
  </blockquote>
  
  <p>for any syntax I try. Is there any way to implement it using HSQL itself rather than Native SQL?</p>