 IF EXISTS
(
    SELECT 1
    FROM SYS.VIEWS
    WHERE NAME = 'V_EST_GRP_COMIS_PDV_CPL_TENTACLE'
)
    BEGIN
        DROP VIEW V_EST_GRP_COMIS_PDV_CPL_TENTACLE;
    END;
GO
CREATE VIEW V_EST_GRP_COMIS_PDV_CPL_TENTACLE
AS
     SELECT CD_EMP,
            CD_FILIAL,
            CD_PROD,
            CD_GRP
     FROM EST_GRP_COMIS_PDV_CPL;