jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vibhu Sharma <vi...@projectoffguard.com>
Subject Re: SQL query with date range - 1.6
Date Fri, 02 Apr 2010 22:26:25 GMT
sorry for the trouble guys... my mistake. I was missing the 'space' after
TIMESTAMP

instead of TIMESTAMP'2010-03-10T22:54:33.401+05:30'
it should be TIMESTAMP '2010-03-10T22:54:33.401+05:30'



On Thu, Apr 1, 2010 at 4:46 PM, Vibhu Sharma <vibhu@projectoffguard.com>wrote:

> Hi
>
> I am trying to do a date range query in Jackrabbit 1.6. From what I have
> understood from the net and this<http://markmail.org/message/rvbu2wqmnyvbfe54>[1]
> thread is that following should work:
>
> select * from ofgd:content where posted_on >=
> TIMESTAMP'2010-03-10T22:54:33.
> 401+05:30'
>
> - where posted_on is a 'date' type property
>
> but this gives an InvalidQueryException with the following stack trace
>
>         at
> org.apache.jackrabbit.spi.commons.query.sql.JCRSQLQueryBuilder.createQuery(JCRSQLQueryBuilder.java:166)
>         at
> org.apache.jackrabbit.spi.commons.query.sql.QueryBuilder.createQueryTree(QueryBuilder.java:39)
>         at
> org.apache.jackrabbit.spi.commons.query.QueryParser.parse(QueryParser.java:57)
>         at
> org.apache.jackrabbit.core.query.lucene.QueryImpl.<init>(QueryImpl.java:93)
>         at
> org.apache.jackrabbit.core.query.lucene.SearchIndex.createExecutableQuery(SearchIndex.java:668)
>         at
> org.apache.jackrabbit.core.query.QueryImpl.init(QueryImpl.java:128)
>         at
> org.apache.jackrabbit.core.SearchManager.createQuery(SearchManager.java:290)
>         at
> org.apache.jackrabbit.core.query.QueryManagerImpl.createQuery(QueryManagerImpl.java:102)
>
> Can somebody help me on this.
>
>
> [1] http://markmail.org/message/rvbu2wqmnyvbfe54
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message