SCD using MERGE statement
Page 1 of 1
SCD using MERGE statement
Thanks to Warrent's Design Tip #107, it is very clear how to implement SCD Type 1 and Type 2 using the MERGE statement. However, if a dimension has both Type 1 and Type 2 attributes, we would need to run the MERGE for Type 1 separately, followed by MERGE for Type 2. Is my understanding correct? Is there anyway these 2 can be combined?
Thanks.
Thanks.
Straightdrive- Posts : 2
Join date : 2012-06-29
Re: SCD using MERGE statement
There's a SCD wizard on code plex that might be useful for generating your own coded SQL scripts.
MarkW- Posts : 14
Join date : 2015-11-25
Re: SCD using MERGE statement
No, they can't be combined. That is because the SCD2 changes affect just one existing row, the SCD1 changes affect all rows for that business key.
Also, if performance is an issue, you might want to look at alternatives. In my experience MERGE is slow.
Also, if performance is an issue, you might want to look at alternatives. In my experience MERGE is slow.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|