Something like this:
INSERT INTO tbl (codenumber, name)
WHERE v.[type] = 'p'
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.