<p>Let's say I have an int with the value of 1. How can I convert that int to a zero padded string, such as <code>00000001</code>?</p>

Another way is:
```
```
DECLARE @iVal int = 1
select REPLACE(STR(@iVal, 8, 0), ' ', '0')
```
```