hi falks
i dunno if this is the right place for this question ..
i m trying to find all hospital admissions that occurred within 1 month from last discharge ; i.e select the records separated by less than one month.
i tried this query but it was very slow and inacurate ..
i tried it inside b4J using a recursive function , that worked , but the table can be huge , making the code unusable.
any help with the query ???
i dunno if this is the right place for this question ..
i m trying to find all hospital admissions that occurred within 1 month from last discharge ; i.e select the records separated by less than one month.
i tried this query but it was very slow and inacurate ..
B4X:
Select *
FROM
interview
WHERE
(interview.Date BETWEEN ? AND ?) and
interview.INpatient=1 and
interview.UniqueID IN
(SELECT interview.UniqueID FROM interview where (interview.DischargeDate BETWEEN ? AND ?) )
order by interview.Date
any help with the query ???