-- RETRIVE USER ON SO

select DPOWNER.NAME														WORKERRESPONSIBLE

from PALEBI_SERVICEOPERATION											SOLIST

join PALEBI_SERVICEOPERATIONREVISION									SORLIST
	on SORLIST.PALEBI_SERVICEOPERATIONID = SOLIST.PALEBI_SERVICEOPERATIONID
	and SORLIST.DATAAREAID = SOLIST.DATAAREAID
	and SORLIST.PARTITION = SORLIST.PARTITION

join PALEBI_SERVICEOPERATIONJOURNALWEEK									SOJW
	on SOJW.PALEBI_SERVICEOPERATIONID = SORLIST.PALEBI_SERVICEOPERATIONID
	and SOJW.PALEBI_SERVICEOPERATIONREVISION = SORLIST.PALEBI_SERVICEOPERATIONREVISION
	AND SOJW.DATAAREAID = SORLIST.DATAAREAID
	AND SOJW.PARTITION = SORLIST.PARTITION

join PALEBI_SERVICEOPERATIONJOURNALDAY									SOJD
	on SOJD.SERVICEOPERATIONJOURNALWEEKREFRECID = SOJW.RECID
	AND SOJD.DATAAREAID = SORLIST.DATAAREAID
	AND SOJD.PARTITION = SORLIST.PARTITION

left outer join HCMWORKER												HCMOWNER
	on HCMOWNER.RECID = SORLIST.OWNERWORKER
	AND HCMOWNER.PARTITION = SORLIST.PARTITION

		left outer join DIRPARTYTABLE									DPOWNER
			on DPOWNER.RECID = HCMOWNER.PERSON

where SOLIST.CASELOGREFRECID = 5637288577
group by DPOWNER.NAME