Bug! Problem in integer datatype

Institutions such as museums and botanical gardens typically assign accession numbers to objects or plants as they acquire them. Often, this consists of a four digit year, followed by a four digit number, with leading zeroes preserved, when necessary. That second component starts at 0001 at the beginning of the year, and increments by 1 with each new object that is acquired.

Essentially, then, each accession number is a string of eight characters, but conceptually, it has a blend of the characteristics of a number and those of a string. Sometimes a hyphen is placed between the year and the second component.

The idea behind @pritamrajak’s original post has merit with regard to the above.