Skip to content

Instantly share code, notes, and snippets.

@xivSolutions
Created October 10, 2018 20:40
Show Gist options
  • Save xivSolutions/6f321d1da56fa808e93ac670b912b4e5 to your computer and use it in GitHub Desktop.
Save xivSolutions/6f321d1da56fa808e93ac670b912b4e5 to your computer and use it in GitHub Desktop.
SQL Server Remove Leading Zeros
SELECT SUBSTRING('00008815208', PATINDEX('%[^0]%', '00008815208'+'.'), LEN('00008815208'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment