DROP VIEW LD0V0H10
;
CREATE VIEW LD0V0H10
      AS SELECT * FROM LD0P0H10 H10
		WHERE EXISTS (SELECT 'X' FROM LD0P0SEKR SEKR
								  JOIN LD0V0ANVANDARE AJD
								  ON AJD.CSSANV=SEKR.CSSANV
								  AND SEKR.PNR=H10.MEDSOKPNR)
		OR NOT EXISTS (SELECT 'X' FROM LD0P0SEKR SEKR WHERE SEKR.PNR=H10.MEDSOKPNR)
;