Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Expiry Date column in SCD Type 2 Dimension

$
0
0
The Effective Date and Expiry Date in our SCD type 2 dimension is date only (no time component),i want to set the Expiry Date = Effective Date -1 of the new row,

(Means a daybefore)

From The Source

EmpID EmpName      Salary  RowEffectiveDt
1          Venkat              2000   10/1/2009
  1          Venkat 3000            21/1/2010
  1          VenkatNaidu 3000            24/1/2010

 Target would be in scd type 2

EmployeeKey    EmpID   EmpName Salary RowEffectiveDt RowExpirationDt  CurrentFlg
1           1         Venkat              2000       10/1/2009 20/1/2010            N
2           1         Venkat 3000       21/1/2010 23/1/2010 N
3           1         VenkatNaidu 3000       24/1/2010 12/31/9999 Y

So How can i handle this type of SCD and it cludes delete flow also

where we will write RowExpiration logic in,i need detail level explanation. 

can any one pls help me

Thanks in advance


gvgnaidu


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>