USE [Configuration01_Dat]
GO
/****** Object:  Table [dbo].[tblImp_MappingGroup]    Script Date: 4/11/2019 3:31:51 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF (NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES  WHERE TABLE_SCHEMA = 'dbo' AND  TABLE_NAME = 'tblImp_MappingGroup'))
BEGIN
	CREATE TABLE [dbo].[tblImp_MappingGroup](
		[nID] [int] NOT NULL,
		[nCompositeID] [int] NULL,
		[nRevisionNumber] [int] NULL,
		[InternalGroupName] [int] NULL,
		[ExternalGroupName] [varchar](150) NULL
	) ON [PRIMARY]
END
GO

SET ANSI_PADDING OFF
GO

IF NOT EXISTS (SELECT * FROM [tblImp_MappingGroup] WHERE nID=5 AND [nCompositeID]=1)
	INSERT [dbo].[tblImp_MappingGroup] ([nID], [nCompositeID], [nRevisionNumber], [InternalGroupName], [ExternalGroupName]) 
	VALUES (5, 1, NULL, 1, N'Administrators');

IF NOT EXISTS (SELECT * FROM [tblImp_MappingGroup] WHERE nID=5 AND [nCompositeID]=2)
	INSERT [dbo].[tblImp_MappingGroup] ([nID], [nCompositeID], [nRevisionNumber], [InternalGroupName], [ExternalGroupName]) 
	VALUES (5, 2, NULL, 4, N'VIZOR Users');
	
IF NOT EXISTS (SELECT * FROM [tblImp_MappingGroup] WHERE nID=5 AND [nCompositeID]=3)
	INSERT [dbo].[tblImp_MappingGroup] ([nID], [nCompositeID], [nRevisionNumber], [InternalGroupName], [ExternalGroupName]) 
	VALUES (5, 3, NULL, 23, N'VIZOR IT Asset Managers');

IF NOT EXISTS (SELECT * FROM [tblImp_MappingGroup] WHERE nID=5 AND [nCompositeID]=4)
	INSERT [dbo].[tblImp_MappingGroup] ([nID], [nCompositeID], [nRevisionNumber], [InternalGroupName], [ExternalGroupName]) 
	VALUES (5, 4, NULL, 6, N'VIZOR HelpDesk-Analysts');

	
GO
