@Haikuo wrote:
@Kurt_Bremser, If the new_column is setup as length of 4, then SUBSTR() seems redundant in this context.
Until, for some reason, you need your target variable to be longer to also hold values from somewhere else, but the requirement for the first 4 digits HERE did not change. Then you suddenly get more than 4 characters, and your results go bonkers just because you wanted to avoid some typing.
Keep in mind that the length statement might be pages away from the place where you use the variable(s). Always make your code explicit so the intention is clearly visible right on the spot.
Been there, done that, and had to spend days to debug it.
... View more