
CREATE VIEW LD0V0C40 AS 
SELECT *
FROM LD0P0C40 URVAL
WHERE EXISTS (SELECT 'X'
      FROM LD0VLC C
      WHERE C.FAMRATTNR = URVAL.FAMRATTNR)
   OR EXISTS (SELECT 'X'
      FROM LD0V0H H
      WHERE H.FAMRATTNR = URVAL.FAMRATTNR);

       
