
/****** Object:  Table [dbo].[EST_NF_ENT_CHECKIN_ENTRADA_TEMP]    Script Date: 28/03/2022 10:02:05 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[EST_NF_DIVERG_LOTE_CHECKIN_SAIDA_TEMP]') AND type in (N'U'))
DROP TABLE [dbo].[EST_NF_DIVERG_LOTE_CHECKIN_SAIDA_TEMP]
GO

/****** Object:  Table [dbo].[EST_NF_DIVERG_LOTE_CHECKIN_SAIDA_TEMP]    Script Date: 28/03/2022 10:02:05 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

-- CD_EMP,CD_FILIAL,CD_PROD,NR_LOTE,
-- DT_VALID,DT_FABR,QTDE_APURADA,CD_MS

CREATE TABLE [dbo].[EST_NF_DIVERG_LOTE_CHECKIN_SAIDA_TEMP](
	[CD_EMP] [int] NOT NULL,
	[CD_FILIAL] [int] NOT NULL,
	[CD_NF] [int] NOT NULL,
	[CD_PROD] [int] NOT NULL,
	[NR_LOTE] [varchar](100) NOT NULL,	
	[DT_VALID] [datetime] NULL,
	[DT_FABR] [datetime] NULL,
	[QTDE_APURADA] [int] NULL,
	[CD_MS] [varchar](15) NULL,
 CONSTRAINT [PK_EST_NF_DIVERG_LOTE_CHECKIN_SAIDA_TEMP] PRIMARY KEY CLUSTERED 
(
	[CD_EMP] ASC,
	[CD_FILIAL] ASC,
	[CD_NF] ASC,
	[CD_PROD] ASC,
	[NR_LOTE] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 97, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO



