title: Building a string while looping though the Datatable,inserting, then resetting the string and repeat
body: <p>I need to build a string from a DataTable,insert it then repeat for each unique value in column1.</p>
  
  <pre><code>*column1    *column2   *Column3    (Column to insert)
     1            a          b           a|b|c|d
     1            c          d           a|b|c|d
     2            e          f           e|f|g|h
     2            g          h           e|f|g|h
  </code></pre>
  
  <p>this is what I have so far,</p>
  
  <pre><code> foreach (DataRow dr in table.Rows)
          {
         pvar += dr["Column2"].ToString() + "|" + dr["Column3"].ToString();
          }
         System.Data.DataColumn newColumn = new System.Data.DataColumn
                                            ("pvar", typeof(System.String));
                 newColumn.DefaultValue = pvar;
                 table.Columns.Add(newColumn);
                 pvar = "";
          }
  </code></pre>
  
  <p>Problem I have is that I'm getting:</p>
  
  <pre><code> *column1    *column2   *Column3    (Column to insert)
     1            a          b           a|b|c|d|e|f|g|h
     1            c          d           a|b|c|d|e|f|g|h
     2            e          f           a|b|c|d|e|f|g|h
     2            g          h           a|b|c|d|e|f|g|h
  </code></pre>