Something like this:INSERT INTO tbl (codenumber, name)
SELECT
number+@num,
@name
FROM
MASTER..spt_values v
WHERE v.[type] = 'p'
WHERE
number < 5;
I qualifying by saying "something like" because, it won't give you the prefixed zero's that you are looking for if the data type of codenumber is numeric. If the data type is not numeric, what I posted above will not work.