ALTER TABLE [dbo].[Clientes_Temp] ADD [Id_Cli_Relac] SMALLINT NULL
GO



CREATE TABLE [dbo].[Clientes_Temp_XCampos](
	[Id_Cliente_Temp] [int] NOT NULL,
	[Id_Campo] [int] NOT NULL,
	[Valor_String] [varchar](101) NULL,
	[Valor_Integer] [int] NULL,
	[Valor_DT] [datetime] NULL,
	[Valor_Decimal] [decimal](20, 4) NULL,
	[Valor_Memo] [text] NULL,
 CONSTRAINT [PK_CliTmpXC_PorId] PRIMARY KEY CLUSTERED 
(
	[Id_Cliente_Temp] ASC,
	[Id_Campo] ASC
)
)

GO



ALTER TABLE [dbo].[Clientes_Temp_XCampos]  ADD  CONSTRAINT [FK_CliTmpXC_Clientes] FOREIGN KEY([Id_Cliente_Temp])
REFERENCES [dbo].[Clientes_Temp] ([Id_Cliente_Temp])
GO


ALTER TABLE [dbo].[Clientes_Temp_XCampos]  ADD  CONSTRAINT [FK_CliTmpXC_XCampos] FOREIGN KEY([Id_Campo])
REFERENCES [dbo].[xCampos] ([Id_Campo])
GO
