CREATE TABLE [dbo].[nm_claims_natures]
(
[nat_convention_code] [dbo].[ais_code_short] NOT NULL,
[nat_nature_code] [dbo].[ais_code_short] NOT NULL,
[nat_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[nat_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nat_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nat_responsability_percent] [dbo].[ais_decimal2] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_claims_natures] ADD CONSTRAINT [CK__nm_claims_natures_nat_nature_code__string_pk] CHECK ((len(ltrim(rtrim([nat_nature_code])))>(0) AND charindex('*',[nat_nature_code])=(0) AND charindex('%',[nat_nature_code])=(0)))
GO
ALTER TABLE [dbo].[nm_claims_natures] ADD CONSTRAINT [PK_nm_claims_natures] PRIMARY KEY CLUSTERED  ([nat_convention_code], [nat_nature_code]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_claims_natures] ADD CONSTRAINT [FK_nm_claims_natures_nm_claims_conventions] FOREIGN KEY ([nat_convention_code]) REFERENCES [dbo].[nm_claims_conventions] ([cnv_convention_code])
GO
