Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transformation Editor Expression

Status
Not open for further replies.

Ringers

Technical User
Feb 26, 2004
180
0
0
AU
I am using the Transformation editor in BIDS 2005 to change a column Divsion buyer when column divsion code is equal to different values.

Can someone tell me the expression I need to do this;

When Column Divsion code = Null, Column: Divsion buyer = Starcom - non Tech

When Column Divsion code = MV, Column: Divsion buyer = Mediavest

When Column Divsion code = SP, Column: Divsion buyer = Starcom - P&G


 
I have come up with this but it doesn't work?

([Division_Code]==MV?[Mediavest]:([Division_Code]==SC?[Starcom - Non Tech]:[Division_Code]==SP?[Starcom - P&G]:[Division_Code]==ST?[Starcom - Tech]:[Starcom - Non Tech]))
 
I worked it out;

([Division Code]=="MV"?"Mediavest":([Division Code]=="SC"?"Starcom - Non Tech":[Division Code]=="SP"?"Starcom - P&G":[Division Code]=="ST"?"Starcom - Tech":"Starcom - Non Tech"))

Strings need to be "" and fields [].
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top