CREATE TABLE [dbo].[claim_smvts]
(
[csmvt_mvt_code] [dbo].[ais_code_short] NOT NULL,
[csmvt_smvt_code] [dbo].[ais_code_short] NOT NULL,
[csmvt_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[csmvt_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[csmvt_l3] [nvarchar] (64) COLLATE French_CI_AS NULL
) ON [PRIMARY]

ALTER TABLE [dbo].[claim_smvts] ADD
CONSTRAINT [CK__claim_smvts_csmvt_smvt_code__string_pk] CHECK ((len(ltrim(rtrim([csmvt_smvt_code])))>(0) AND charindex('*',[csmvt_smvt_code])=(0) AND charindex('%',[csmvt_smvt_code])=(0)))
GO
ALTER TABLE [dbo].[claim_smvts] ADD CONSTRAINT [PK_claim_smvts] PRIMARY KEY CLUSTERED  ([csmvt_mvt_code], [csmvt_smvt_code]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[claim_smvts] ADD CONSTRAINT [FK_claim_smvts_claim_mvts] FOREIGN KEY ([csmvt_mvt_code]) REFERENCES [dbo].[claim_mvts] ([cmvt_mvt_code])
GO
