IF EXISTS (SELECT 1 FROM SYS.VIEWS WHERE NAME = 'LD0V1U60')
BEGIN
DROP VIEW LD0V1U60
END
;

CREATE VIEW LD0V1U60  AS SELECT * FROM LD0P0U60 U60
 WHERE EXISTS (SELECT 'X' FROM LD0V0U50 U50 WHERE U60.ANORDNARNR = U50.ANORDUTFORNR AND ANORDNARE = 1 ) 
 OR EXISTS (SELECT 'X' FROM LD0V0U50 U50 WHERE U60.UTFORARNR = U50.ANORDUTFORNR AND U50.UTFORARE = 1 )
;

