SQL Server add zero if there is length less than specific number
The following code does what you need, the bit you need is the REPLICATE section:

declare @var nvarchar(10);

set @var = '321'

select @var + REPLICATE('0',9-LEN(@var))


RESULT:

321000000