title: How do I compare 2 rows from the same table (SQL Server)?
body: <p>I need to create a background job that processes a table looking for rows matching on a particular id with different statuses. It will store the row data in a string to compare the data against a row with a matching id.</p>
  <p>I know the syntax to get the row data, but I have never tried comparing 2 rows from the same table before. How is it done? Would I need to use variables to store the data from each? Or some other way?</p>
  <p>(Using SQL Server 2008)</p>