DROP VIEW LD0VAA0EnrollmentActivity
;

CREATE VIEW LD0VAA0EnrollmentActivity
AS 
SELECT
 U35.AKTIVITETNR
,U35.INSKRIVNINGSNR
,U35.PRAKPROJNR
,U35.PLATSNR
,U35.STATUS
,U35.FROMDAT
,U35.TOMDAT
,U35.PLATSFROM
,U35.PLATSTOM
,U35.REGDATUM
,U35.REGTID
,U35.PLANAKTIVITETNR
,U35.UPDDAT
,U35.UPDSIGN
,Q.KLARTEXT AS STATUS_T
,U60.BENAMNING AS PRAKPROJ_T
,U60.PRAKPROJ AS PRAKPROJ
FROM LD0V0U35 AS U35 
LEFT OUTER JOIN LD0V0Q01 AS Q ON Q.KODTYP = 'LNSTATUS' AND U35.STATUS = Q.KOD
LEFT OUTER JOIN LD0V0U60 AS U60 ON U60.PRAKPROJNR = U35.PRAKPROJNR
;
