IF EXISTS
(
    SELECT *
    FROM sys.views
    WHERE object_id = OBJECT_ID(N'[dbo].V_EST_PROD_PRECO_DESC_PRG_TENTACLE')
)
    DROP VIEW [dbo].[V_EST_PROD_PRECO_DESC_PRG_TENTACLE];
GO
CREATE VIEW [DBO].[V_EST_PROD_PRECO_DESC_PRG_TENTACLE]
AS
     SELECT CD_PRECO_PRG,
            CD_USU,
            CONVERT (DATE,DT_CAD)as DT_CAD,
            GETDATE() AS DT_HR_CARGA,
            CONVERT (DATE,DT_INI)as DT_INI,
            CONVERT (DATE,DT_ULT_ALT)as DT_ULT_ALT,
            CONVERT (DATE,DT_VENCTO)as DT_VENCTO,
            FLAG_PERC_DESC_LIMITE,
            NM_PROGRAMACAO,
            PERC_DESC_FIX,
            TP_CLIENTE
     FROM EST_PROD_PRECO_DESC_PRG
     WHERE DT_VENCTO >= GETDATE();
GO