title: How can I create a multi value for a column?
body: <p>I have two tables <code>TBLCustomers</code> and <code>TBLGroupCustomers</code>. I want to insert multi value in a third table that</p>
  
  <pre><code>CREATE TABLE [dbo].[TBLG_Groups] 
  (
      [GrId]   INT           IDENTITY (1, 1) NOT NULL,
      [CEmail] VARCHAR (250) NOT NULL,
      [GName]  NVARCHAR (70) NOT NULL,
      [CName]  NVARCHAR (450) NULL, 
      PRIMARY KEY CLUSTERED ([GrId] ASC, [CEmail] ASC, [GName] ASC)
  )
  </code></pre>
  
  <p><code>CEmail</code>, <code>CName</code> from <code>TBLCustomers</code> and <code>GName</code> from <code>TBLGroupCustomers</code></p>
  
  <p>To do this, I created a stored procedure:</p>
  
  <pre><code>CREATE PROC dbo.spG_Groups
      @CEmail VARCHAR(250),
      @GName NVARCHAR (70),
      @CName NVARCHAR(450)
  AS
  BEGIN
      INSERT INTO TBLG_Groups(CEmail, GName, CName)
      VALUES (@CEmail, @GName, @CName)
  END
  </code></pre>
  
  <p>Because I want show the name of customers join group I want each record of table have a single cname and gname, </p>
  
  <p>C# code</p>
  
  <pre><code>SqlCommand cmd1 = new SqlCommand("spG_Groups", conn);
  cmd1.CommandType = CommandType.StoredProcedure;
  
  List&lt;String&gt; YrStrList1 = new List&lt;string&gt;(); 
  
  foreach (ListItem li in chGp.Items)
  {
      if (li.Selected)
      {
          YrStrList1.Add(li.Value);
  
          cmd1.Parameters.Add(new SqlParameter("@CName", txtCName.Value));
          cmd1.Parameters.Add(new SqlParameter("@CEmail", txtemail.Value));
          cmd1.Parameters.Add(new SqlParameter("@GName", YrStrList1.ToString()));
  
          cmd1.ExecuteNonQuery();
      }
  }
  </code></pre>
  
  <p>It's not working what do I for this?</p>