I'm Working to create a simple repair log serial number. I would like to create a unique code for each repair but I don't want the numbers continuing on forever, I would like to use Zone(department), Year and Number to identify each repair. I'm Using SQL server 17. I know I can concatenate the fields together to create the number but I'm not sure how to reset the number at the start of the year?
(picture to help describe)
Thanks!