Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Book Image

Microsoft SQL Server 2008 R2 Master Data Services

Overview of this book

Table of Contents (18 chapters)
Microsoft SQL Server 2008 R2 Master Data Services
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Updating member attributes


As well as creating new members, the other more common use of the staging process will be to update attributes for existing members (or indeed new members that you have created in the same batch). This is carried out by loading records into the staging table mdm.tblStgMemberAttribute.

As we saw in Chapter 4, there are two main types of attribute: domain and free-form. When loading domain attributes, we obviously need to ensure that the values we are trying to set already exist in the entity that the domain attribute is based on. In our example, we will update the following attributes for our newly-loaded UK stores:

  • City (domain attribute based on the City entity)

  • Postcode (free-form)

In the following example, we first load records to mdm.tblStgMember, which will add new members for the Cities for any UK stores to the City entity to ensure the attribute update is successful. We then load records to mdm.tblStgMemberAttribute that will update the City domain attribute...