SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[LogTmInventRes](
	[IdUsuario] [varchar](5) NOT NULL,
	[Item] [int] NOT NULL DEFAULT ((0)),
	[IdCia] [char](2) NOT NULL DEFAULT ('00'),
	[Periodo] [varchar](50) NULL,
	[Producto1] [varchar](50) NULL,
	[Producto2] [varchar](50) NULL,
	[Producto3] [varchar](50) NULL,
	[Producto4] [varchar](50) NULL,
	[Producto5] [varchar](50) NULL,
	[Producido] [varchar](50) NULL,
	[Procesado] [varchar](50) NULL,
	[CrudoCom] [varchar](50) NULL,
	[Diferencia] [varchar](50) NULL,
	[PorcDif] [varchar](50) NULL,
	[Unidad] [varchar](50) NULL,
 CONSTRAINT [PK_LogTmInventRes] PRIMARY KEY CLUSTERED 
(
	[IdUsuario] ASC,
	[Item] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[LogTmInventRes]  WITH CHECK ADD  CONSTRAINT [CK_LogTmInventResIdCia] CHECK  ((len([IdCia])>(0)))
GO
ALTER TABLE [dbo].[LogTmInventRes] CHECK CONSTRAINT [CK_LogTmInventResIdCia]
GO
ALTER TABLE [dbo].[LogTmInventRes]  WITH CHECK ADD  CONSTRAINT [CK_LogTmInventResIdUsuario] CHECK  ((len([IdUsuario])>(0)))
GO
ALTER TABLE [dbo].[LogTmInventRes] CHECK CONSTRAINT [CK_LogTmInventResIdUsuario]