Hi Fabio,
no i did not, cause i don't know how. :-)

i tried something with exists and the datetime as a parameter but the
filter wont compile:
My query to retrieve the animals is:

from Animal animal
where EXISTS
      select max(medState.animalId)
      from MedicalStatus medState, LogEntry entry
      where
        animal.id = medState.animalId
        AND medState.LogEntryId = entry.Id
        AND entry.ReportingDate <= :DateTime
        group by animal.id
        having
          max (
            case (medStat.HealthState)
            when ('SICK') then (rpd.ReportingDate + '_0')
            when ('SANE') then (rpd.ReportingDate + '_1')
            end
          ) not like '%_1'
)



On 12 Mai, 16:46, Fabio Maulo <[email protected]> wrote:
> 2009/5/12 zoid <[email protected]>
>
>
>
> > Now i want to apply a filter either to the MedicalStatus-bag of the
> > animal or the animal itself to get only the actual medical status or
> > the status at a given time.
> > Has anybody did something like use using filters or any other generic
> > approach?
>
> did you ?
>
> --
> Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to