Once the data is imported in a Staging table through Bulk Insert, then I need to do two steps:
- Transformations
- Insert/Update in Main table
Is the JOINS are the best tool OR there is something quicker/more efficient to perform these tasks?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I would probably do something like this:
MERGEcommand which is ideally suited for just this – update some existing rows, insert some new rows (and possibly delete some old “orphaned” rows). It’s a single command which can handle just about all insert, update, delete scenario in a single callSee some great articles on how to use the
MERGEcommand: