Hi,
Please explain the situation resolvation
Now i am getting data -1,-12,-13,-1,-1
data started with 1 should be flip sign, if getting '-' should be '+' or '+' should be'-'. except data start with 12, remaining start with 1 should be change.
i have to get the data like +1,-12,+13,+1,+1
How to do in transformer, please provide me the guidance
Case statement in transformer
Moderators: chulett, rschirm, roy
Re: Case statement in transformer
Hi i experimented will do with below logic even fine.
( Left(column,1) ='1' and Left(column,2) <>'12')
but looking any other way we can filter.
( Left(column,1) ='1' and Left(column,2) <>'12')
but looking any other way we can filter.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 342
- Joined: Tue Nov 04, 2008 10:38 am
- Location: Chennai, India
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
why you are putting a filter condition when you want to just flip the sign?
Code: Select all
if (column = '-12') then column else (if (left(convert('+-','',column),1) = '1') then column * -1 else column)
if (left(convert('+- ','',column),1) = '1' and (left(convert('+- ','',column),2) <> '12') then column * -1 else column
if (left(abs(column),1) = '1' and (left(abs(column),2) <> '12') then column * -1 else column
Priyadarshi Kunal
Genius may have its limitations, but stupidity is not thus handicapped.
Genius may have its limitations, but stupidity is not thus handicapped.