0 Replies Latest reply on Jan 21, 2003 10:37 AM by Alex Shneyderman

    Date fields in WHERE clause howto?

    Alex Shneyderman Newbie

      How do I do a where clause in EJBQL that has a Date field?

      I need to make a query of type:

      findDetailsForInterval (
      ParticipantLocal p,
      java.util.Date start,
      java.util.Date end)"
      query="SELECT OBJECT (rd)
      FROM RequestDetail rd
      WHERE rd.request.participant = ?1 and
      rd.detailDate between !2 and !3"

      Participant (1) <-> (n) Request (1) <-> (n) RequestDetail

      is my schema and RequestDetail has a field detailDate

      for some reason the query above gives a parse error

      Any thoughts would be greatly appreciated