CREATE TABLE [dbo].[acc_cl_bordereaux_variables]
(
[clbvar_bordereau_id] [int] NOT NULL,
[clbvar_variable_code] [dbo].[ais_code_short] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cl_bordereaux_variables] ADD CONSTRAINT [CK__acc_cl_bordereaux_variables_clbvar_variable_code__string_pk] CHECK ((len(ltrim(rtrim([clbvar_variable_code])))>(0) AND charindex('*',[clbvar_variable_code])=(0) AND charindex('%',[clbvar_variable_code])=(0)))
GO
ALTER TABLE [dbo].[acc_cl_bordereaux_variables] ADD CONSTRAINT [PK_acc_cl_bordereaux_variables] PRIMARY KEY CLUSTERED  ([clbvar_bordereau_id], [clbvar_variable_code]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[acc_cl_bordereaux_variables] ADD CONSTRAINT [FK_acc_cl_bordereaux_variables_acc_cl_bordereaux] FOREIGN KEY ([clbvar_bordereau_id]) REFERENCES [dbo].[acc_cl_bordereaux] ([clb_bordereau_id])
GO
