>Dear Experts
>
>Table1 has following Data
>
>
>S_NO -- CODE
>1------ 1102
>1------ 1102
>1------ 1103
>1------ 1104
>1------ 1201
>1------ 1202
>1------ 1203
>
>
>I want to replace s_no as below
>
>S_NO-- CODE
>1------ 1101
>1------ 1102
>1------ 1103
>1------ 1104
>2------ 1201
>2------ 1202
>2------ 1203
>
>sno column must increment with 1 where code column changes
If you want to increment the Sno where code changes you then will have this result:
S_NO-- CODE
1------ 1101
2------ 1102
3------ 1103
4------ 1104
5------ 1201
6------ 1202
7------ 1203
So, please tell us what you want.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.