IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_PRC_FILIAL_CONFIG_TENTACLE'
)
    BEGIN
        DROP VIEW V_PRC_FILIAL_CONFIG_TENTACLE;
    END;
GO
CREATE VIEW V_PRC_FILIAL_CONFIG_TENTACLE
AS
     SELECT CD_EMP,
            CD_FILIAL,
            CD_CHAVE,
            VALOR,
            NULL AS OBJETIVO,
            GETDATE() AS DT_HR_CARGA,
            CONVERT (DATE,DT_ULT_ALT) as DT_ULT_ALT
     FROM PRC_FILIAL_CONFIG;