Hi all
My Requirement to be done in Modify Stage
IF input_column='2'
THEN 'Y'
Else 'N'
Input column is Integer
Target column is Varchar
I have gone through the Posts and Found
lookup_string_from_int16() and lookup_int16_from_string() functions
According to my understanding , I understand that we can search only Strings !!!!
Please help me with my requirement with Modify stage only ....
lookup_int16_from_string
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 54
- Joined: Thu Oct 18, 2007 4:20 am
- Location: Chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can do either lookup. But there's only one format for the {table_definition} that you include in the function. Review the manual carefully - it is properly explained there.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 54
- Joined: Thu Oct 18, 2007 4:20 am
- Location: Chennai
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You still need 'N' in the lookup table, even though you've set it as default value (if I understand your requirement correctly). Can you be more specific about what "failed" means in this instance? What output do you get?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Even though it may be counter-intuitive, try reversing the pairs in the table definition.
Note, too, that default_value property is only for int data types - for strings the property to use is default_string.
Code: Select all
TargetValue:string = lookup_string_from_int16[{default_string='N'}('N'=1; 'Y'=2;)](SourceName)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.