I need to convert int datafield to nvarchar with leading zeros
example:
1 convert to \'001\'
867 convert to \'000867\', etc.
thx.
I was wondering, would this be on any use to you?
declare @val int,@len=800 select replace(str(@val,@len),' ','0')