SSIS Split Condition

I need to implement SCD Type 2 this is my condition in my split condition before updating my RecordEndDate and eventually adding it in the database. But even though it does not satisfy the condition it still keeps on adding it in the database

((PlateNo == Stage_PlateNo)) && (([Car Name] != [Stage_Model]) || 
 ([Manufacturer] != [Stage_Manufacturer]) ||
  [Year Model] != Stage_Year || 
  [Car Body Type] != Stage_BodyType ||
  Transmission != Stage_Transmission ||
 [Daily Rate (in Peso)] != Stage_DailyRate
 )

Upvotes: 2

Views: 135

Answers (1)

Mike Honey
Mike Honey

Reputation: 15037

IMO your requirements are far too complex to attempt in an SSIS Expression. I recommend you recode this logic in a Script transformation. I would pre-create a new Column e.g. Include_Row and in the Script set it's value to yes or no.

This approach will give you much more code flexibility and better debugging possibilities.

Upvotes: 1

Related Questions