scottaherbst
Technical User
I'm using CR10, SQL server DB. I'm getting an error message "Failed to open a rowset... UNKNOWN MSG." Any ideas what I've got wrong.
SELECT view_episode_summary_current.PATID, view_episode_summary_current.program_code,
View_episode_summary_current.EPISODE_NUMBER,
View_episode_summary_current.preadmit_admission_date,
View_episode_summary_current.program_X_RRG_code,
LOCUS_Adult_Assessment.functional_status,
LOCUS_Adult_Assessment.PATID,
LOCUS_Adult_Assessment.EPISODE_NUMBER,
LOCUS_Adult_Assessment.rating_date
FROM SYSTEM.view_episode_summary_current
View_episode_summary_current LEFT OUTER JOIN SYSTEM.LOCUS_Adult_Assessment LOCUS_Adult_Assessment ON ((view_episode_summary_current.PATID = LOCUS_Adult_Assessment.PATID) AND (View_episode_summary_current.EPISODE_NUMBER = LOCUS_Adult_Assessment.EPISODE_NUMBER))
WHERE Locus_Adult_Assessment.rating_date = (SELECT MAX(A.rating_Date) FROM SYSTEM.LOCUS_ADULT_ASSESSMENT A, SYSTEM.View_Episode_Summary_Current B
WHERE A.PATID = B.PATID AND A.episode_number = B.Episode_number) AND View_episode_summary_current.program_X_RRG_code = {?RRG}
ORDER BY view_episode_summary_current.PATID,
LOCUS_Adult_Assessment.rating_date
SELECT view_episode_summary_current.PATID, view_episode_summary_current.program_code,
View_episode_summary_current.EPISODE_NUMBER,
View_episode_summary_current.preadmit_admission_date,
View_episode_summary_current.program_X_RRG_code,
LOCUS_Adult_Assessment.functional_status,
LOCUS_Adult_Assessment.PATID,
LOCUS_Adult_Assessment.EPISODE_NUMBER,
LOCUS_Adult_Assessment.rating_date
FROM SYSTEM.view_episode_summary_current
View_episode_summary_current LEFT OUTER JOIN SYSTEM.LOCUS_Adult_Assessment LOCUS_Adult_Assessment ON ((view_episode_summary_current.PATID = LOCUS_Adult_Assessment.PATID) AND (View_episode_summary_current.EPISODE_NUMBER = LOCUS_Adult_Assessment.EPISODE_NUMBER))
WHERE Locus_Adult_Assessment.rating_date = (SELECT MAX(A.rating_Date) FROM SYSTEM.LOCUS_ADULT_ASSESSMENT A, SYSTEM.View_Episode_Summary_Current B
WHERE A.PATID = B.PATID AND A.episode_number = B.Episode_number) AND View_episode_summary_current.program_X_RRG_code = {?RRG}
ORDER BY view_episode_summary_current.PATID,
LOCUS_Adult_Assessment.rating_date