I'm trying to combine records based on the ClusterID to have an enriched data of customer records.
How will I be able to group the following using MS SQL? Coalesce won't work as records need to be on the same row to make it work, and if I have more than 2 matches per cluster it's going to be a tedious processing. Using max by ClusterId in all columns is a workaround I'm doing but I was hoping there is a more efficient way to do this.
Have:
ClusterID,CustomerNo,Name,Email,Mobile,Address,PostalCode,Passport,ProfileNo
100,NULL,Person,person@email.com,NULL,OfficeAdd,12345,NULL,123
100,456,Person,person@email.com,98765,HomeAdd,34567,P12345,NULL
**This is a result of the SSIS DQS Matching node (https://ssisdqsmatching.codeplex.com/). It can do the match, but cannot handle the survivorship portion to get the golden record.
Want:
ClusterID,CustomerNo,Name,Email,Mobile,Address,PostalCode,Passport,ProfileNo
100,456,Person,person@email.com,98765,OfficeAdd,12345,P12345,123
Any thoughts would be much appreciated. Thank you!