Hi thanks for the reply,
SELECT second.Workunit, second.NHI, second.Case_Start_Date, second.Case_End_Date,secon
FROM Case_Details second
WHERE Exists ( select * from Case_Details first
where first.Case_ID <> second.Case_ID
And first.NHI = second.NHI
And second.Case_Start_Date - first.Case_End_Date Between 0 And 365 )
AND second.Service_Subtype <> 'Inpatient Mental Health Services'
AND second.workunit =:PARAM3
Main Topics
Browse All Topics





by: rbrookerPosted on 2007-07-08 at 20:02:21ID: 19442654
can you post the entire sql please?