We have a field called employee number in our database. It is char(10) field. we are storing the numbers right justified. so we are storing the numbers as " 1"
, " 2"
etc. I am not sure why we started doing this because it happened before I started working here.
Because of this, each function in the business logic that has an employee number as one of the parameters needs to right justify the number. If we forget that, it won't update the database properly.
My question is:
Is there a better way to do this so that we don't have to format the number in each function?