SCD using MERGE statement

View previous topic View next topic Go down

SCD using MERGE statement

Post  Straightdrive on 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

View user profile

Back to top Go down

Re: SCD using MERGE statement

Post  MarkW on 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

View user profile

Back to top Go down

Re: SCD using MERGE statement

Post  ron.dunn on 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

View user profile http://ajilius.com

Back to top Go down

Re: SCD using MERGE statement

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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