title: Insert into associative table
body: <p>I'm trying to insert into an Associative table on Visual Studio 2013, but I also believe I could have the structure for the tables set up incorrectly. What I need to happen is the Associative table needs to take the primary keys of both the Tasks and Student tables. </p>
  
  <p>Expected Result:</p>
  
  <pre><code>StudentID   TaskID      Status
  ----------- ----------- ------
  1           1           N
  1           2           N
  1           3           N
  1           4           N
  1           5           N
  1           6           N
  1           7           N
  2           1           N
  2           2           N
  2           3           N
  2           4           N
  2           5           N
  2           6           N
  2           7           N
  </code></pre>
  
  <p>Any help would be greatly appreciated!</p>
  
  <hr>
  
  <pre><code>CREATE TABLE [dbo].[STUDENT] (
  [StudentID]    INT            IDENTITY (1, 1) NOT NULL,
  ...
  PRIMARY KEY CLUSTERED ([StudentID] ASC));
  
  
  CREATE TABLE [dbo].[TASKS] (
  [TaskID]       INT            NOT NULL,
  [TaskName]     NVARCHAR (MAX) NULL,
  [TaskCategory] NVARCHAR (MAX) NULL,
  PRIMARY KEY CLUSTERED ([TaskID] ASC));
  
  
  CREATE TABLE [dbo].[ASSOCIATIVE] (
  [StudentID] INT        NOT NULL,
  [TaskID]    INT        NOT NULL,
  [Status]    NCHAR (10) NULL,
  PRIMARY KEY CLUSTERED ([TaskID] ASC, [StudentID] ASC),
  CONSTRAINT [FK_ASSOCIATIVE_STUDENT] FOREIGN KEY ([StudentID]) REFERENCES [dbo].[STUDENT] ([StudentID]),
  CONSTRAINT [FK_ASSOCIATIVE_TASKS] FOREIGN KEY ([TaskID]) REFERENCES [dbo].[TASKS] ([TaskID]));
  </code></pre>