IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_BC_PRACA_COMPENSACAO_TENTACLE'
)
    BEGIN
        DROP VIEW V_BC_PRACA_COMPENSACAO_TENTACLE;
    END;
GO
CREATE VIEW V_BC_PRACA_COMPENSACAO_TENTACLE
AS
     SELECT cd_comp_chq,
            cd_usu,
            dt_ult_alt,
            nm_praca_compensacao,
            CONVERT (DATE,dt_cad)as dt_cad
     FROM BC_PRACA_COMPENSACAO;