SQL Query: Removing leading zeroes from SQL Server field

Posted by VIJI Tuesday, December 1, 2009

The SQL Query for Removing leading zeroes from SQL Server field

The following SQL Query removes the leading zeroes from "Field" field

Select replace(ltrim(replace(Field1, '0', ' ')) , ' ', '0') FROM TestTable


 

1 Responses to SQL Query: Removing leading zeroes from SQL Server field

  1. Sadhana Says:
  2. Hey pal, you saved my day :)
    Thanks a ton!!

     

Post a Comment