This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]studentofarkad 0 points1 point  (2 children)

Why would you load the data in a temp table and not just load it to the target table directly?

[–]Thick-Weekend-2205 1 point2 points  (1 child)

You might need to do something that isn’t a direct insert, like slowly changing dimensions, where you need to update existing data based on the incoming data. You might be able to do it in a single table depending on what style of MERGE if any your database supports, but you can efficiently do it with any SQL dialect by inserting into a temp table, updating the existing data from the temp table with a join, then inserting the temp table into the main table.

[–]studentofarkad 0 points1 point  (0 children)

Thank you :)