IF  NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EST_PROD_TRANSF_LACRE_IT]') AND type in (N'U'))
begin

CREATE TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT](
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[CD_CTR] [int] NOT NULL,
	[NR_LACRE] [varchar](150) NOT NULL,
	[NR_VOLUME] [int] NOT NULL,
	[CD_PROD] [int] NOT NULL,
	[LOTE] [varchar](20) NOT NULL,
	[DT_FABRICACAO] [datetime] NULL,
	[DT_VENCTO] [datetime] NULL,
	[QTDE_ITEM] [money] NULL,
 CONSTRAINT [PK_EST_PROD_TRANSF_LACRE_IT] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_FILIAL] ASC,
	[CD_CTR] ASC,
	[NR_LACRE] ASC,
	[NR_VOLUME] ASC,
	[CD_PROD] ASC,
	[LOTE] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]



ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_CD_EMP]  DEFAULT ((0)) FOR [CD_EMP]

ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_CD_FILIAL]  DEFAULT ((0)) FOR [CD_FILIAL]


ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_CD_CTR]  DEFAULT ((0)) FOR [CD_CTR]


ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_NR_LACRE]  DEFAULT ((0)) FOR [NR_LACRE]


ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_NR_VOLUME]  DEFAULT ((0)) FOR [NR_VOLUME]


ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_CD_PROD]  DEFAULT ((0)) FOR [CD_PROD]

ALTER TABLE [dbo].[EST_PROD_TRANSF_LACRE_IT] ADD  CONSTRAINT [DF_EST_PROD_TRANSF_LACRE_IT_LOTE]  DEFAULT ((0)) FOR [LOTE]



end