title: Serial number issue in SQL Server 2008
body: <p>I have orders and order details table as shown as below:</p>
  
  <h2>OrderDetails</h2>
  
  <pre><code>Order_ID   int 
  Order_Code varchar(10)
  Product Name   varchar(50)
  Qty     Int
  SeqNO   varchar(10)
  </code></pre>
  
  <p>Below are the sample records</p>
  
  <pre><code>10001    OC   Ottoman   10  Null
  10002    OC   Ottoman   3   Null  
  10003    OC   Ottoman   2   Null
  10004    OC   Ottoman   2   Null
  </code></pre>
  
  <p>Is there anyway I can update the SeqNo column with 1, 1A,1B,1C if the Order_Code is same else it should increment by one.</p>
  
  <p>for example</p>
  
  <pre><code>10001    OC   Ottoman   10  Null
  10002    OD   Ottoman   3   Null  
  10003    OE   Ottoman   2   Null
  10004    OF   Ottoman   2   Null
  </code></pre>
  
  <p>this one should be 1,2,3,4</p>
  
  <p>Please help</p>