on 11-09-2005 6:03 PM
Hi all,
I'm trying to do an EJB QL with dates. I need to get the results which <i>fechaSolicitud</i> are between a data range (<i>fechaIni</i> and <i>fechaFin</i>).
In my db fechaSolicitud is of the type java.sql.Date. I have tried to do the query with the <i>fechaIni</i> and <i>fechaFin</i> 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: <i>EJB QL statement is invalid. See General User Output View for details.</i>.
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
done
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mireia,
There is a limitation on QL queries that involve data types:
<i>If a cmp-field represents a date type and will be involved in a QL query, its Java type must be java.util.Date.</i>
For more information, see: <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/13/dbb2b66146934a9662918755038ea1/frameset.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/13/dbb2b66146934a9662918755038ea1/frameset.htm</a>
Best regards,
Viliana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.