title: I need to write Update statement in sybase
body: <p>Here is my table if we observe it there are 6 match_ids and in those 3 are 795 and 3 are td party and some unique match_ids. </p>
  
  <p>What I need is if there are duplicate match_ids with same party I need first row of duplicate to be marked as x and if there are no duplicate for them I need them also marked as x.  </p>
  
  <p>If I use this query:</p>
  
  <pre><code>select distinct match_id,party , count(match_id) from temp_table 
  group by match_id,party having count(*) &gt; 0
  </code></pre>
  
  <p>I am able to get count but how to select from there?</p>
  
  <hr>
  
  <p>Present table:</p>
  
  <pre><code>match_id ------------ party--------  ind    
  413082597------------ co-795    ---------                      
  413082597------------ co-795                        
  413082597------------ TD     
  413082597------------ TD
  413082597------------ TD
  424421945-------      co-3376
  424421946-------      co-3376
  </code></pre>
  
  <p>What needed is:</p>
  
  <pre><code>match_id -----    party ---------   ind
  413082597------- CO-795   -----------x
  413082597--------CO-795
  413082597--------CO-795
  413082597------ TD   ---------------x
  413082597----   ----TD
  413082597---------TD
  424421945-------CO-3376------------   x
  424421946----   CO-3376  ----------------x
  </code></pre>