INSERT INTO [dbo].[DAS] ([SerialNumber], 
[Type], 
[MaxModules], 
[MaxMemory], 
[MaxSampleRate], 
[MinSampleRate], 
[FirmwareVersion], 
[CalDate], 
[ProtocolVersion], 
[LastModified], 
[LastModifiedBy], 
[Version], 
[LocalOnly], 
[LastUsed], 
[LastUsedBy], 
[Connection], 
[Channels], 
[Position], 
[ChannelTypes], 
[Reprogramable], 
[Reconfigurable],
[IsModule], 
[PositionOnDistributor], 
[PositionOnChain], 
[Port], 
[ParentDAS]) 
VALUES ('DIR Prototype', 
43, 
4, 
0, 
10000, 
1, 
'H0A1', 
'2016-04-07 16:03:30.020', 
1, 
'2019-11-18 00:00:00.000', 
'DATAPRO_SYSTEM', 
1, 
0, 
'1970-01-01 00:00:00.000', 
'', 
'', 
12, 
'Prototype', 
'1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,4', 
0, 
0, 
0, 
0, 
0, 
0, 
'')
DECLARE @dasID int;
SET @dasID = CAST(SCOPE_IDENTITY() as int);

INSERT INTO [dbo].[DASChannels]
           ([DASId]
           ,[ChannelIdx]
           ,[SupportedBridges]
           ,[SupportedExcitations]
           ,[DASDisplayOrder]
           ,[LocalOnly]
           ,[SupportedDigitalInputModes]
           ,[SupportedSquibFireModes]
           ,[SupportedDigitalOutputModes]
           ,[ModuleSerialNumber]
           ,[SettingId]
           ,[ModuleArrayIndex])
     VALUES
           (@dasID
           ,0	
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30	
           ,0
           ,0	
           ,''	
           ,0	
           ,0),
           (@dasID
           ,1
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,0),
           (@dasID
           ,2
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,0),
		   (@dasID
           ,3
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,1),
           (@dasID
           ,4
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,1),
           (@dasID
           ,5
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,1),
		   (@dasID
           ,6
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,2),
           (@dasID
           ,7
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,2),
           (@dasID
           ,8
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,2),
		   (@dasID
           ,9
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,3),
           (@dasID
           ,10
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,3),
           (@dasID
           ,11
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,3),
		   (@dasID
           ,12
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,4),
           (@dasID
           ,13
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,4),
           (@dasID
           ,14
           ,12	
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,4),
		   (@dasID
           ,15
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,5),
           (@dasID
           ,16
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,5),
           (@dasID
           ,17
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,5),
		   (@dasID
           ,18
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,6),
           (@dasID
           ,19
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,6),
           (@dasID
           ,20
           ,256
           ,16	
           ,-1	
           ,0	
           ,30
           ,0
           ,0	
           ,''	
           ,0	
           ,6)