title: DataRow Filter Expression
body: <p>Hi I have a DataSet and it has a table called Header. The Header table has a field called Long Agency Code. There is table called Wage that also has a field called Long Agency Code.  I want to filter the Wage table based on the Long Agency Code available in Header Table. The following code snippet shows below:</p>
  
  <pre><code>DataTable dt = DataSet.Tables["Header"];
  
                      DataRowCollection headerRowCollection = dt.Rows;
  
                      foreach (DataRow headerRow in headerRowCollection)
                      {
                          FixedOutputter outputter = GetOutputter("Header", streamWriter);
                          MapElementCollection mapElementCollection = MapUtility.GetMapElementCollection(DataMap, "Header", DataMapFormatters);
                          outputter.OutputSingleRow(headerRow, mapElementCollection);
                          string filterExpression = "Long Agency Code == '" + headerRow["Long Agency Code"] + "'";
                          DataRow[] wageRowCollection = DataSet.Tables["Wage"].Select(filterExpression);
  </code></pre>
  
  <p>It blows up at the very last line with the message: "Syntax error: Missing operand after 'Agency' operator."</p>