I have two table in SQLserver
Company table
Transactions table
Company table
___________________________________
CId _ Name _ StartDate _ EndDate
____|________________________________
1 | ABC | 01/04/2024 | 31/03/2025
And 2and table have
Transactions table
___________________________________
Tid _ Description _ Transactions date
____|________________________________
1 | Expense | | 3/01/2025
I want to insert record when transactions table date matches from company table date range then Insert record
If not match record not saved
If
Tid _ Description _ Transactions date
____|________________________________
1 | Expense | | 22/01/2027
Date range not over lapping