As Naomi said, a calendar table is helpful for this kind of query, but if you don't have one, you can create a view using a recursive query. For example
Set DateFormat DMY;
Create Table SampleTable(LineId int, FromDate date, ToDate date, Amount int);
Insert SampleTable(LineId, FromDate, ToDate, Amount) Values
(1, '01.01.2021', '10.01.2021', 100),
(2, '05.07.2021', '07.07.2021', 300);
Select * From SampleTable;
go
Create View SampleView As
With cte As
(Select LineId, FromDate, ToDate, Amount/(DateDiff(day, FromDate, ToDate) + 1) As Amount
From SampleTable
Union All
Select LineId, DateAdd(day, 1, FromDate) As FromDate, ToDate, Amount
From cte
Where FromDate < ToDate)
Select LineId, Convert(char(10), FromDate, 104) As FromDate, Amount
From cte;
go
-- Test view
Select LineId, FromDate, Amount
From SampleView
Order By LineId, FromDate;
go
Drop View SampleView;
go
Drop Table SampleTable;
Tom