If you want to keep your data in a string, I think you should PAD your string to the left before saving to your database if that field is part of a key.
So in your database, the data would be something like:
" 300"
" 315"
" 3100"
I'm not sure what these numbers are, but if they are a unique no, like a customer number for example, we would pad to the left with zeros instead of blanks.
Perhaps there's a better way, but this is how we do it.
So in your database, the data would be something like:
" 300"
" 315"
" 3100"
I'm not sure what these numbers are, but if they are a unique no, like a customer number for example, we would pad to the left with zeros instead of blanks.
Perhaps there's a better way, but this is how we do it.