USE [HelpDesk02_Def]
GO
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tblTaskDependency')
BEGIN
CREATE TABLE [dbo].[tblTaskDependency](
	[nID] [int] NOT NULL,
	[nChoiceID] [int] NULL,
	[tName] [varchar](255) NULL,
 CONSTRAINT [PK_tblTaskDependency] PRIMARY KEY CLUSTERED 
(
	[nID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, 
ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
END

GO
IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=1)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (1, 1, N'None');
	
IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=2)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (2, 2, N'01');
	
IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=3)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (3, 3, N'02');
	
IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=4)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (4, 4, N'03');
	
IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=5)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (5, 5, N'04');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=6)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (6, 6, N'05');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=7)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (7, 7, N'06');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=8)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (8, 8, N'07');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=9)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (9, 9, N'08');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=10)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (10, 10, N'09');

IF NOT EXISTS(SELECT * FROM [tblTaskDependency] WHERE nID=11)
	INSERT [dbo].[tblTaskDependency] ([nID], [nChoiceID], [tName]) 
	VALUES (11, 11, N'10');
	
