how to remove leading and trailing zeros in sql code example
Example: trim leading zeros in sql
SUBSTRING(str_col, PATINDEX('%[^0]%', str_col+'.'), LEN(str_col))
SUBSTRING(str_col, PATINDEX('%[^0]%', str_col+'.'), LEN(str_col))