Hi
I have an Excel sheet connected to an MDS data store that the user utilizes to pull down data and enrich the data with values then save it back to the MDS data store.
As part of the MDS application, I need to capture the user input in order to:
- save the user enrichments for audit purposes so I can see which users added which enrichments
- archive the user enrichments so that it can be re-instated in the event that the user enrichment data is lost
- capture when a user make a change to drive the application data e.g. a user sets a flag to 'close' a record such that it does not re-appear on the MDS data the next time the user pulls data from MDS.
The user enrichments are stored in the following tables:
[MasterDataServices].[mdm].[tblTransaction]
[MasterDataServices].[mdm].[tblAttribute]
[MasterDataServices].[mdm].[tblUser]
I wrote the following very basic SQL query to pull the data.
SELECT u.UserName, attr.DisplayName, trx.*
FROM [MasterDataServices].[mdm].[tblTransaction] trx
INNER JOIN [mdm].[tblAttribute] attr ON trx.Attribute_ID = attr.ID
INNER JOIN [mdm].[tblUser] u ON trx.LastChgUserID = u.ID
WHERE trx.LastChgDTM > GETDATE()-5
My question is; is this the correct approach? Is there something out there that can do this in a better way?
Thanks in advance.