Incrementing the value in column in Sql server
Posted on 2014-03-20
I have the following requirement.
I have the table with following structure
TranType, episodeid, Adviseserialno
I want to update AdviseSerialno in such a way that the next number is incremented by 1 from previous number. This sequence number should get reset (I,e should start from 1 )
for each change of Episodeid.
How I can achieve this using SQL . DB is Sql 2008R2
Thanks in advance