Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Autoincrement ID

$
0
0
I want to update id column to be reset and incremented by 1 whenever the new siteid will come;

Raw Table;

IDSITEID PARSINGTYPECONTROLLINGSENSORIDALIASID2
095301 Delivery Left1
095303 Delivery Right2
095404 Return Left3
095402 Return center4
095405 Return right5
096301 Delivery Left6
096302 Delivery Right7
096403 Return L8
096404 Return Center9
096405 Return R10[b][/b]

Desired table

IDSITEID PARSINGTYPECONTROLLINGSENSORIDALIASID2
195301 Delivery Left1
295302 Delivery Right2
395403 Return Left3
495404 Return center4
595405 Return right5
196301 Delivery Left6
296302 Delivery Right7
396403 Return L8
496404 Return Center9
596405 Return R10

Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>