IF NOT EXISTS (
    SELECT 1 
    FROM sys.objects 
    WHERE object_id = OBJECT_ID('dbo.EST_PROD_CPL_ESTOQUE_INDISPONIVEL') 
      AND type = 'U'
)
BEGIN

	CREATE TABLE EST_PROD_CPL_ESTOQUE_INDISPONIVEL (
		CD_PROD INT,
		CD_FILIAL INT,
		DT_HR_VENDA DATETIME,
		LOCAL_VENDA VARCHAR(255) COLLATE SQL_Latin1_General_CP1_CI_AS,
		QT_ESTOQUE_COMERCIALIZACAO INT,
		QT_RESERVADA_PENDENCIAS INT,
		QT_RESERVADA_PREVENDA INT,
		QT_DISPONIVEL_VENDA INT,
		CD_USU_VENDA INT
	)
   
END
GO
