IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_RC_CLI_MSG_CRM_TENTACLE'
)
    BEGIN
        DROP VIEW V_RC_CLI_MSG_CRM_TENTACLE;
    END;
GO
CREATE VIEW V_RC_CLI_MSG_CRM_TENTACLE
AS
     SELECT CD_EMP,
            CD_MSG,
            DS_MSG,
            CONVERT (DATE,DT_INI)as DT_INI,
            CONVERT (DATE,DT_FIM)as DT_FIM,
            QT_EXIB,
            FLAG_TODOS_CLI,
            STS_MSG
     FROM RC_CLI_MSG_CRM;