|
A different question is do you really need the character portion in the field? If this is a table storing multiple sets of type codes, for example, it makes sense. Anyway, the other way around the LPAD in the sort is to store the data with leading zeros out to the maximum length you'll ever see in your lifetime. You get the same result, but the ORDER by will do the sort without a function on the field.
Just my 2 cents.
__________________
It takes 2 points to draw a straight line, but at least 3 points to draw a conclusion.
|