SQL Server repeat rows for n number of times
To repeat each row or record n number of times, based on some column value in a table, we could do it in two ways either by using CTE or if n is less than 2048 then you can do a simple inner join on master.dbo.spt_values table with a condition where ...
mssqlserver.dev2 min read