Advertisement

11.02.2005 at 10:40AM PST, ID: 21616968
[x]
Attachment Details

HQL: how to retrieve rows that fall within the date range

Asked by dbrownell83 in Java Programming Language

Tags: , ,

Hi experts,

I have a table, which has a start and end date, and i want to query, using Hibernate's query language, whether a given day falls between these two SQL dates.  Can anyone help me out?

So, that is, Lets say here's a row:
A    november 1 - december 1
B    november 15 - january 15
C    december 20 - january 20

So i want to get B and C if I search with the date "january 12"

DanStart Free Trial
[+][-]11.02.2005 at 11:38AM PST, ID: 15211113

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.02.2005 at 11:43AM PST, ID: 15211180

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.02.2005 at 12:53PM PST, ID: 15211844

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.02.2005 at 02:04PM PST, ID: 15212538

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: hql, date, range
Sign Up Now!
Solution Provided By: objects
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.04.2005 at 04:49PM PST, ID: 15229196

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32