I have a column, say PROD_NUM that contains a \'number\' that is left padded with zeros. For example 001004569. They are all nine characters long.
I do not use a num
Cast it to integer, cast it back to varchar, and check that it equals the original string?
Works in all versions:
TRANSLATE(PROD_NUM,'123456789','000000000') = '000000000'