select sImp from Impressora where pPid=0 and iVer = iVAt and lExc=0
select a.pPId,
                   b.sCodigo    sCodItem,
                   b.sDescricao sItem,
                   a.nTotQt,
                   a.nOP,
                   a.nSdo,
                   b.nQtMin,
                   b.nNivel,
                   c.sUnidade   sUni
            from Previsao_Consumo_Linha a left join Itens         b on a.pItem = b.pPId and b.iVer = b.iVAt
                                          left join UnidadeMedida c on a.pUni  = c.pPId and c.iVer = c.iVAt
            where a.iVer  = a.iVAt
              and a.pCapa = 5
              and a.lExc  = 0
            order by b.sCodigo