Hi,
I have source column Code char(9) which contains code in both forms numbers and letters like 161,ADG.
I'm using transformer where i have condition that when code is 112 then current timestamp else column2
Condition : if code = 161 then CurrentTimestamp() else column2
But im facing a problem when using above condition, its unable to match the number since its defined as char. May I know whats the best way to convert char, so that it can match both numbers and letters in the condition.
Can someone help me with this.
Regards,
Rajesh
Conversion in Transformer
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 6
- Joined: Fri Mar 14, 2014 2:29 am
Conversion in Transformer
Regards,
Rajesh
Rajesh
It's not unable to match it, it should be perfectly capable of doing that but you're right the CHAR part does make it a little trickier. I would suggest a couple of things, one or both may help.
Test for the character value "161" rather than the number...i.e. use quotes so it does a string match rather than feel a need to convert one side or the other. And since the CHAR carries trailing spaces you may need to trim the field in the comparison but I'm thinking just that first step may solve things for you.
Test for the character value "161" rather than the number...i.e. use quotes so it does a string match rather than feel a need to convert one side or the other. And since the CHAR carries trailing spaces you may need to trim the field in the comparison but I'm thinking just that first step may solve things for you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 6
- Joined: Fri Mar 14, 2014 2:29 am