If i need two characaters, i will check whether if any of the codevalue has 2 characters then i will update the same value into PnxCodeValue....and for the remaining rows, i will start with 99,98,97,96....00 and when it goes beyond 00, i will start getting the alpha numeric characters like 0A,ZC,1A....like that