I dont prefer using code with internal tables like master..spt_values especially in production as we cant guarantee implementation to be same across versions. I mostly use my own number table for similar situations