I need to generate an 8-digit sequential number following the bank ..
I have the code column in the budget table, it has the value of ex: 1800000001 where 18 is the year and the rest is a sequential number, I need to check the system for the last budget and create a next sequential number in the system. example is 1800000001, I want it to generate the code 1800000002 and so on, as long as when the last number reaches two digits it replaces a 0, when 3, two zeros, eg: 1800000099, this number after the year has to contain 8 houses. / p>