This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes EJB-QL - Date Range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB-QL - Date Range" Watch "EJB-QL - Date Range" New topic
Author

EJB-QL - Date Range

BoonHock Ng
Greenhorn

Joined: Jul 16, 2004
Posts: 4
Can EJB-QL or JBOSS-QL perform date range queries?

EG.
SELECT OBJECT(c) FROM customer c WHERE c.DOB BETWEEN ?1 AND ?2
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
It doesn't look like it (at least not up to 2.0). You can download the 2.1 specs and check out the EJB-QL EBNF to see for yourself. 2.0 wants scalar values, or functions that produce scalar values to do what you want -- not dates.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB-QL - Date Range
 
Similar Threads
EJB QL question
CMP Date sybase
Using EJB-QL LIKE and a replacable param(?1).
SQL and EJB-QL
EJB QL BETWEEN Operator