I have a table with rows where the period value is 1 - these always already exist since a separate routine will have always done this population DDL/DML below

create table tblmain (period int, rfreq int, pfreq int)
insert tblmain (period , rfreq , pfreq )
select 1 , 1 , 1
union all
select 1 , 1 , 3
union all
select 1 , 1 , 6
union all
select 1 , 3 , 3
union all
select 1 , 3 , 6
union all
select 1 , 6 , 6
union all
select 1 , 6 , 12

I need to do inserts into this table with incremented period values (the rfreq and pfreq columns to have same values as for Period 1) up to and including
a Period number assigned in table, MaxPeriods (DDL/DML below) JOINing the two tables on the respective rfreq columns

CREATE TABLE MaxPeriods (rfreq INT , MaxPeriod INT)
insert MaxPeriods (rfreq , MaxPeriod)
select 1 , 5
union all
select 3 , 3
union all
select 6 , 2

I could put together a loop solution but would much rather use a set-based approach but can't get my head around it
The desired result is set out below ie those rows with period >= 2

select * from tblmain order by period, rfreq, pfreq

period rfreq pfreq

1 1 1
1 1 3
1 1 6
1 3 3
1 3 6
1 6 6
1 6 12

-- all rows below to be produced by required INSERT code

2 1 1
2 1 3
2 1 6
2 3 3
2 3 6
2 6 6
2 6 12

-- no period 3 or higher for rfreq value 6 because table MaxPeriods holds a MaxPeriod value of 2 where MaxPeriods.rfreq = 6

3 1 1
3 1 3
3 1 6
3 3 3
3 3 6

-- no period 4 or higher for rfreq value 3 because table MaxPeriods holds a MaxPeriod value of 3 where MaxPeriods.rfreq = 3

4 1 1
4 1 3
4 1 6
5 1 1
5 1 3
5 1 6

So to summarise, I need to insert new rows into tblmain with incremented period values from 2 up to the value set in table MaxPeriods matching MaxPeriods.rfreq to tblmain.rfreq
so using the data posted in MaxPeriods, I will INSERT rows from Period 2 to Period 5 for tblmain.rfreq value 1, Period 2 to Period 3 for tblmain.rfreq value 3 and just Period 2 for tblmain.rfreq value 6

Thanks in advance