February 20, 2008 at 10:54 am
Hi everybody.I need help doing some calculations in the Derived column transformation editor.
I use case statement in sql to do these kind of scripts but it looks like this editor does not allow case statements
Following is one of the calculations I want to perfom.
(convert(varchar(50),sum(CASE WHEN RT.intFkRateGroupID = 8 THEN CONVERT(decimal(18,3),l.decUnits) ELSE 0 END))) as [Basic Salary Normal]
Your help will be highly apreciated
Best regards
February 21, 2008 at 10:22 am
You can use the ? : operator:
intFkRateGroupID == 8 ? decUnits : 0
for varchar (50), set the Data Type to String and Length to 50.
February 21, 2008 at 12:08 pm
Thants Mdaniel.
while I was still searching yesterday I found the solution same as the one u just gave me and it worked perfectly.
Thanks a lot
Best regards
Guy
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply