Quantcast
Channel: SQLServerCentral » Data Warehousing » Analysis Services » Latest topics
Viewing all articles
Browse latest Browse all 1341

Querying SCD Type 2 data to determine current value & date of change for a value that changes back and forth.

$
0
0
The subject kind of spells out what I am looking for. Attached is an example table image of an example of the issue.The ACTUAL answer I'm looking for is (transposed for text):CustomerID: 111CurrentSalesTerritory: 1CurrentTerritoryEffectiveDate: 8/1/2014CustomerID: 555CurrentSalesTerritory: 2CurrentTerritoryEffectiveDate: 7/2/2014CustomerID "111" is tricky because not only does the record version when ANY field changes (not just the one I am doing analysis on) but it sometimes goes back and forth.Sorry if this is a newbie question, but I'm new to SCD.

Viewing all articles
Browse latest Browse all 1341

Trending Articles