cancel
Showing results for 
Search instead for 
Did you mean: 

EJB QL query with dates

Former Member
0 Kudos

Hi all,

I'm trying to do an EJB QL with dates. I need to get the results where fechaSolicitud is between a data range (fechaIni and fechaFin).

In my db fechaSolicitud is of the type java.sql.Date. I have tried to do the query with the fechaIni and fechaFin beeing the following types: java.lang.Long, long, java.sql.Timestamp and java.sql.Date and the code of the query:

a) select object(b) from RenovacionesBean b where b.fechaSolicitud > ?1 and b.fechaSolicitud < ?2

b) select object(b) from RenovacionesBean b where b.fechaSolicitud between ?1 and ?2.

When I press the Validate button (with all the possible combinations) I get the following message: EJB QL statement is invalid. See General User Output View for details..

There isn't neither Output View nor details where I can see which is the error.

Can somebody help me. I have search for this question in this forum and the sun developer forum and I get no valid solution.

Best regards,

Mireia

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Resolved

Answers (0)