Here I need suggestions while I am trying to do some transaction in sql.
I am using "Microsoft SQL Azure (RTM) - 12.0.2000.8 Oct 1 2020 18:48:35". I am getting data from On-premises data-sources using Azure Logic App (recurrence).
The logic app insert the data in my some of tables lets suppose tableHR, tableProjects. Before it insert the data it truncate the both tables, so that I can get the updated data every time recurrence happens.
Now I am doing some manipulation using both of tables and inserting the manipulates data into my some other tables (which I will use late for my application).
Table tableHR having prox 10000 of records and tableProject is having aprox. 6000 records.
So here I need that whatever the manipulated data I am inserting into my other tables if it is already there then it should update the records else if records does not exists ten it should insert.
I can write the procedure for that, but this data should be very correct to run my application. So what point I need to consider (concurrency & performance) while doing this transaction so that every time I call this procedure it should run and update my existing tables correctly.