CREATE OR REPLACE VIEW NFPEDIDO AS
    SELECT DISTINCT IT.CDFILIAL, IT.NRLANCTONF,IT.CDFILIALPED, IT.NRPEDIDO, N.CDFILIRECE, N.NRNOTAFISC, N.DTENTRSAID, N.DTEMISSAO, N.VRNOTAFISC
      FROM ITEMPRODUTO IT JOIN NOTAFISCAL N
                            ON IT.CDFILIAL = N.CDFILIAL
                            AND IT.NRLANCTONF = N.NRLANCTONF 
     WHERE IT.NRPEDIDO IS NOT NULL
/