Oneill0003
asked on
SSIS Derived Column
Experts:
I have a DTS package that I’m trying to rewrite in SSIS, In my DTS package on one of my transformation were I’m mapping source to destination I have a field that gets populated by a global variable, I use a simple active x script to determine witch variable to use, the script looks like this
Function Main()
If DTSGlobalVariables("i_Max_ Skl_Stat_D atetime"). Value < DTSGlobalVariables("i_Max_ Agt_Stat_D atetime"). Value Then
DTSDestination("Data_Datet ime") = DTSGlobalVariables("i_Max_ Skl_Stat_D atetime"). Value
Else
DTSDestination("Data_Datet ime") = DTSGlobalVariables("i_Max_ Agt_Stat_D atetime"). Value
End if
Main = DTSTransformStat_OK
End Function
In SSIS I’m trying to use a Derived Column transformation to accomplish since it has an expression editor but can't see how to use the IF / ELSE logic doesn’t seem to like it, is this not the right transformation to use for this?
Thanks in advance.
I have a DTS package that I’m trying to rewrite in SSIS, In my DTS package on one of my transformation were I’m mapping source to destination I have a field that gets populated by a global variable, I use a simple active x script to determine witch variable to use, the script looks like this
Function Main()
If DTSGlobalVariables("i_Max_
DTSDestination("Data_Datet
Else
DTSDestination("Data_Datet
End if
Main = DTSTransformStat_OK
End Function
In SSIS I’m trying to use a Derived Column transformation to accomplish since it has an expression editor but can't see how to use the IF / ELSE logic doesn’t seem to like it, is this not the right transformation to use for this?
Thanks in advance.
Conditional's within a derived column are formatted as:
Boolean Expression ? True part : False part
e.g. IsNull(MyField) ? "" : MyField
Boolean Expression ? True part : False part
e.g. IsNull(MyField) ? "" : MyField
ASKER
drydenhogg: i'm having trouble getting my expression build can you give me a hand with this?
i_Max_Skl_Stat_Datetime < i_Max_Agt_Stat_Datetime ? i_Max_Skl_Stat_Datetime : i_Max_Agt_Stat_Datetime
Thanks guys!
i_Max_Skl_Stat_Datetime < i_Max_Agt_Stat_Datetime ? i_Max_Skl_Stat_Datetime : i_Max_Agt_Stat_Datetime
Thanks guys!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks drydenhogg, that worked great, i was just missing a few things on my syntax but got it working.!
just explore it and u will be able to find something on it.
Let me know if u dont find anything..
Thanks,
Naval