CREATE TABLE [dbo].[nm_pol_renew_types_split]
(
[nmprts_renew_type_code] [dbo].[ais_code_short] NOT NULL,
[nmprts_renew_split_code] [dbo].[ais_code_short] NOT NULL,
[nmprts_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[nmprts_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmprts_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmprts_months] [smallint] NULL,
[nmprts_order] [int] NOT NULL,
[nmprts_sys] [bit] NOT NULL CONSTRAINT [DF__nm_pol_renew_types_split__nmprts_sys] DEFAULT ((0))
) ON [PRIMARY]
ALTER TABLE [dbo].[nm_pol_renew_types_split] ADD
CONSTRAINT [CK__nm_pol_renew_types_split_nmprts_renew_split_code__string_pk] CHECK ((len(ltrim(rtrim([nmprts_renew_split_code])))>(0) AND charindex('*',[nmprts_renew_split_code])=(0) AND charindex('%',[nmprts_renew_split_code])=(0)))

GO
ALTER TABLE [dbo].[nm_pol_renew_types_split] ADD CONSTRAINT [PK_nm_pol_renew_types_split_1] PRIMARY KEY CLUSTERED  ([nmprts_renew_type_code], [nmprts_renew_split_code]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_pol_renew_types_split] ADD CONSTRAINT [FK_nm_pol_renew_types_split_nm_pol_renew_types] FOREIGN KEY ([nmprts_renew_type_code]) REFERENCES [dbo].[nm_pol_renew_types] ([nmprt_renew_type_code])
GO
