I have a char(12) column with data such as:
000000004012 000000615737 000000000012 000000000100
And I need to convert it to this:
4012 615737 12 100
My initial thought was to use string manipulations like CHARINDEX. However, I will need to search from left to right for the first occurrence of NOT 0 . How to do this in SQL Server?
source share