Ver originalDECLARE @cadena VARCHAR(15) SET @cadena='ROW_NUMBER() OVER (ORDER BY NOMBRE)'SELECT replicate('0',7-len(@cadena)) + @cadena