CREATE TABLE [dbo].[nm_activities]
(
[ape_activity_code] [dbo].[ais_code_short] NOT NULL,
[ape_l1] [nvarchar] (256) COLLATE French_CI_AS NOT NULL,
[ape_l2] [nvarchar] (256) COLLATE French_CI_AS NULL,
[ape_l3] [nvarchar] (256) COLLATE French_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_activities] ADD CONSTRAINT [CK__nm_activities_ape_activity_code__string_pk] CHECK ((len(ltrim(rtrim([ape_activity_code])))>(0) AND charindex('*',[ape_activity_code])=(0) AND charindex('%',[ape_activity_code])=(0)))
GO
ALTER TABLE [dbo].[nm_activities] ADD CONSTRAINT [PK_nm_activities] PRIMARY KEY CLUSTERED  ([ape_activity_code]) ON [PRIMARY]
GO
