How to remove leading zeros from a field in a SQL statement ?
I am working on a SQL query that reads from a SQLServer database to produce extract files. We are required to remove the leading zeros from a particular field, which is a simple VARCHAR(10) field.
For example, if the field contains '00001B', the SELECT statement needs to return the data as '1B'.
Is there a way in SQL to easily trim leading zero? I know there is an RTRIM function, but this seems only to remove spaces but not sql trim leading zero.