HSQL and MSSQL datepart parameter
<p>I have an embedded HSQLDB database for testing. The production database is SQL Server 2012.</p>

<p>I am using a native query which has this predicate on the where:</p>

<pre><code>and (pc.SOME_DATE IS NOT NULL 
AND pc.SOME_DATE BETWEEN SYSDATETIME() AND DATEADD(minute, c.MINUTES_TO_ADD, SYSDATETIME()))
</code></pre>

<p>and in SQLServer it runs ok, but on HSQLDB it fails with:</p>

<pre><code>org.hsqldb.HsqlException: user lacks privilege or object not found: MINUTE
</code></pre>

<p>I solved the similar problem with the SYSDATETIME by creating a function, but I don't know how I can solve this incompatibility between mssql using a keyword and hsqldb using a varchar.</p>

<p>Any ideas on what I can do to my hsqldb to make this work? Or even to the query... </p>

<p>EDIT:
I know how to make the query work in HSQLDB, the point is to have the same query in SQLServer and in HSQLDB. Can I define some global variable named minute that would represent the value 'minute'.</p>

<p>Thanks!</p>