USE [HelpDesk02_Def]
GO
IF NOT EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'tblTaskStatus')
BEGIN
CREATE TABLE [dbo].[tblTaskStatus](
	[nID] [int] NOT NULL,
	[nChoiceID] [int] NULL,
	[tName] [varchar](255) NULL,
 CONSTRAINT [PK_tblTaskStatus] 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 [tblTaskStatus] WHERE nID=1)
	INSERT [dbo].[tblTaskStatus] ([nID], [nChoiceID], [tName]) 
	VALUES (1, 1, N'Cancelled');
IF NOT EXISTS(SELECT * FROM [tblTaskStatus] WHERE nID=2)
	INSERT [dbo].[tblTaskStatus] ([nID], [nChoiceID], [tName]) 
	VALUES (2, 2, N'Complete');
IF NOT EXISTS(SELECT * FROM [tblTaskStatus] WHERE nID=3)
	INSERT [dbo].[tblTaskStatus] ([nID], [nChoiceID], [tName]) 
	VALUES (3, 3, N'In Progress');
IF NOT EXISTS(SELECT * FROM [tblTaskStatus] WHERE nID=4)
	INSERT [dbo].[tblTaskStatus] ([nID], [nChoiceID], [tName]) 
	VALUES (4, 4, N'Not Started');

	
