I am creating a report of open patient enrollments w/o activity for the past nine months. I have the following SQL:
SELECT fields
FROM tables
WHERE DischargeDate is null
and StartOfCaredate < @CutoffDate
and a.patno=b.patno
and LastActivityDate < @CutoffDate
and LastActivityDate in (SELECT max(LastActivityDate)
FROM table
WHERE patno=b.patno
(@CutoffDate = CurrentDate - 9 months)
Can I code this SQL in Report Designer or should I code part of it in SQL Designer to do a rough select and then bring in the resulting record set into Report Designer for further refining of selection?
How would I code the sub-query in Report Designer?
I am using Informix and SeagateInfo 7.5
SELECT fields
FROM tables
WHERE DischargeDate is null
and StartOfCaredate < @CutoffDate
and a.patno=b.patno
and LastActivityDate < @CutoffDate
and LastActivityDate in (SELECT max(LastActivityDate)
FROM table
WHERE patno=b.patno
(@CutoffDate = CurrentDate - 9 months)
Can I code this SQL in Report Designer or should I code part of it in SQL Designer to do a rough select and then bring in the resulting record set into Report Designer for further refining of selection?
How would I code the sub-query in Report Designer?
I am using Informix and SeagateInfo 7.5