DROP VIEW LD0VAAYLMCASEWORKERORDERER
;
CREATE VIEW LD0VAAYLMCASEWORKERORDERER AS 
SELECT ORGM.HAND, ORGM.ORGID, ORGM.ORGENHNR, ORGM.FOMDAT, ORGM.TOMDAT, ORGM.UPDSIGN, 
		ORGM.UPDDAT, ORGM.ADRKOD, ORG.NAMN ORGNAMN, ORG.ANVISORGAM, ORG.HANDLORGAM, ORG.MOTTAGORGAM, CWD.BESADR, CWD.ADRESS, CWD.POSTNR,CWD.ORT 
FROM LD0V0I HANDL 
INNER JOIN LD0V0I01 ORGM 
ON HANDL.HAND = ORGM.HAND 
INNER JOIN LD0V0J ORGDAT 
ON ORGM.ORGID = ORGDAT.ORGID 
INNER JOIN LD0V0J01 ORG 
ON ORG.ORGID = ORGM.ORGID 
AND ORG.ORGENHNR = ORGM.ORGENHNR 
LEFT  JOIN LD0V0I02 CWD 
ON ORG.ADRHAND = CWD.ADRKOD
;
