DROP VIEW LD0V0N900_READ;
CREATE VIEW LD0V0N900_READ
AS SELECT UPPDRAGIFO.* FROM LD0P0N900 UPPDRAGIFO

LEFT JOIN LD0P0SEKR sek 
	ON UPPDRAGIFO.PNR = sek.PNR
	WHERE (sek.PNR IS NULL 
	OR sek.CSSANV = (SELECT ANVID AS CSSANV  FROM LD0P0SESS SESS WHERE SESS.SESSID=@@SPID))
WITH CHECK OPTION
;