Kimball Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SCD using MERGE statement

3 posters

Go down

SCD using MERGE statement Empty SCD using MERGE statement

Post  Straightdrive Wed Jul 18, 2012 2:06 am

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.

Straightdrive

Posts : 2
Join date : 2012-06-29

Back to top Go down

SCD using MERGE statement Empty Re: SCD using MERGE statement

Post  MarkW Thu Nov 26, 2015 5:12 am

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

Back to top Go down

SCD using MERGE statement Empty Re: SCD using MERGE statement

Post  ron.dunn Thu Nov 26, 2015 5:55 am

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.

ron.dunn

Posts : 55
Join date : 2015-01-06
Location : Australia

http://ajilius.com

Back to top Go down

SCD using MERGE statement Empty Re: SCD using MERGE statement

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum