I have a problem when I want to add a rent I want to generate several inserts to the payment table depending on the quantity and I do not know how to do it
Example
insert into Alquiler values('48265014',1000,1,getdate(),'19/11/2017',300.00, cantidad 3,1);
go
I want it to appear like this depending on the amount
insert into pagos values(1,300.00,'19/11/2017',0);
insert into pagos values(1,300.00,'19/12/2017',0);
insert into pagos values(1,300.00,'19/01/2018',0);