IF OBJECT_ID('EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL') IS NULL
	BEGIN 
		CREATE TABLE  [EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL](
			[CD_EMP] [int] NOT NULL,
			[CD_FILIAL] [int] NOT NULL,
			[CD_CTR] [int] NOT NULL,
			[CD_LACRE] [int] NOT NULL,
			[CD_USU] [int] NOT NULL,
			[DT_CAD] [datetime] NOT NULL,
		 CONSTRAINT [PK_EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL] PRIMARY KEY CLUSTERED 
		(
			[CD_EMP] ASC,
			[CD_FILIAL] ASC,
			[CD_CTR] ASC,
			[CD_LACRE] ASC
		)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON, FILLFACTOR = 100) 
		) 

		ALTER TABLE [EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL] 
			 WITH CHECK ADD  CONSTRAINT [FK_EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL_EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA] 
				FOREIGN KEY([CD_EMP], [CD_FILIAL], [CD_CTR], [CD_LACRE])
		REFERENCES [EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA] ([CD_EMP], [CD_FILIAL], [CD_CTR], [CD_LACRE])	

		ALTER TABLE [EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL] CHECK CONSTRAINT [FK_EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA_CANCEL_EST_PROD_TRANSF_LACRE_NAO_CHECKIN_ENTRADA]	
		
	END