I want insert record with start date end date from company table to transactions table in sql

Rajnish Pandey
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 24, 2025

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  

 

 

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events