title: Query to select latest updated record
body: <p>I'm working in SQL Server 2008, I'm using the following query to retrieve the records,</p>
  
  <pre><code>SELECT 
      Var_AssoId, Var_Geo,
      Var_Vertical, Var_AccountID,               
      Dt_VisaValidFrom, Dt_VisaValidTill,
      Var_Grade, Var_ProjectID, Bit_SupervisorResponse,
      a.Int_CommentID, Var_CommentsEntered,Dt_Date, 
      Bit_MailUploadStatus, Var_MailUploadPath,  
      a.Dt_UpdatedOn, Var_UpdatedBy, b.Var_SupervisorComments  
  FROM 
      Testingpmo_Travelready_SupervisorInput a   
  INNER JOIN 
      Testingpmo_Travelready_SupervisorComments b ON a.Int_CommentID = b.Int_CommentID  
  ORDER BY 
      a.Dt_UpdatedOn 
  </code></pre>
  
  <p>following is the output of this query,</p>
  
  <pre><code>Var_AssoId    Int_CommentID          Dt_UpdatedOn   
   251922     2       9/25/13 5:22 PM 
   305561     2       9/25/13 5:24 PM 
   109483     1       9/25/13 5:24 PM 
   305561     4       9/25/13 6:09 PM 
   109483     3       10/1/13 12:44 PM    
   109483     3       10/1/13 12:47 PM    
   109483     3       10/1/13 12:48 PM    
   109483     3       10/1/13 12:51 PM    
   109483     3       10/1/13 2:23 PM 
  </code></pre>
  
  <p>I want to get only one latest updated record in each <code>Var_AssoId</code>. </p>
  
  <p>For example the output of the query should be like,</p>
  
  <pre><code> Var_AssoId Int_CommentID   Dt_UpdatedOn    
   251922     2       9/25/13 5:22 PM 
   305561     4       9/25/13 6:09 PM 
   109483     3       10/1/13 2:23 PM 
  </code></pre>
  
  <p>to get this output what i need to add in the query?</p>