IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_RC_ADM_CARTAO_TENTACLE'
)
    BEGIN
        DROP VIEW V_RC_ADM_CARTAO_TENTACLE;
    END;
GO
CREATE VIEW V_RC_ADM_CARTAO_TENTACLE
AS
     SELECT CD_EMP,
            CD_ADM_CARTAO,
            NM_USUAL,
            PARC,
            TP_ADM,
            CD_BANDEIRA_TEF,
            COALESCE(CD_REDE_TEF,0)CD_REDE_TEF,
            FLAG_CTR_VLR,
            VLR_RECEBIMENTO,
            FLAG_BLOQ_ADM_VENDA_AVISTA_DESCONTO,
            CD_BANDEIRA_DEB_TEF,
            CD_BANDEIRA_SCOPE,
            STS_ADM
     FROM RC_ADM_CARTAO;