CREATE TABLE [dbo].[nm_pol_operations]
(
[nmpop_operation_code] [dbo].[ais_code_long] NOT NULL,
[nmpop_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[nmpop_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmpop_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmpop_sys] [bit] NOT NULL CONSTRAINT [DF__nm_pol_operations__nmpop_sys] DEFAULT ((0)),
[nmpop_act_code] [dbo].[ais_code_short] NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[nm_pol_operations] ADD
CONSTRAINT [FK_nm_pol_operations_pol_acts] FOREIGN KEY ([nmpop_act_code]) REFERENCES [dbo].[pol_acts] ([pact_act_code])
ALTER TABLE [dbo].[nm_pol_operations] ADD
CONSTRAINT [CK__nm_pol_operations_nmpop_operation_code__string_pk] CHECK ((len(ltrim(rtrim([nmpop_operation_code])))>(0) AND charindex('*',[nmpop_operation_code])=(0) AND charindex('%',[nmpop_operation_code])=(0)))
GO
ALTER TABLE [dbo].[nm_pol_operations] ADD CONSTRAINT [PK_nm_pol_operations] PRIMARY KEY CLUSTERED  ([nmpop_operation_code]) ON [PRIMARY]
GO
