--Rn01 - criar perâmetro "informa LOTE NFE" no cadastro de produtos
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[INFORMA_LOTE_NFE]') AND type in (N'U'))
BEGIN
DROP TABLE [dbo].[INFORMA_LOTE_NFE]
END

	CREATE TABLE [dbo].[INFORMA_LOTE_NFE](
		[NR_NCM] [varchar](8) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
		[UF] [varchar](2) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
		[CD_PROD] [int] NOT NULL,
	CONSTRAINT [PK_INFORMA_LOTE_NFE] PRIMARY KEY CLUSTERED
	(
	[CD_PROD] ASC,
	[NR_NCM] ASC,
	[UF] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
	) ON [PRIMARY]
	GO