Hi all,
I m trying to convert varchar(20) to bigint 20 using modify stage.As it is written in the manual that for string to int64 conversion,there is no need to write any function i.e. it is default.
but when i m running a job,data is going to output link of modify stage.
Job is giving warning message as:-
Sequential_File_5: When checking operator: When binding input interface field "b" to field "b": Implicit conversion from source type "string[max=18]" to result type "int64": Converting string to number.
Can anyone help me to resolve this issue.
Thanks [/b]
Typeconversion in Modify giving warning
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 132
- Joined: Tue Sep 04, 2007 11:38 am
- Location: NOIDA
-
- Premium Member
- Posts: 132
- Joined: Tue Sep 04, 2007 11:38 am
- Location: NOIDA
Hianbu wrote:If you have spaces that will not handled in implicit conversion. Use Trim and StringToDecimal functions.
There is no space in source data because when i m using Transformer instead of Modify it working perfectly fine but in modify its giving warning message!
and StringTodecimal function i cant use in Modify,instead there is Decima_from_String function,but can you help me to write the code for conversion;
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
outputFieldName:int64=decimal_from_string(inputFieldName)
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: 238
- Joined: Fri Jul 25, 2008 8:55 am
Hi ray.... I am facing the same issue and I tried
outField:int64=decimal_from_string(stock_num) but not working.
Warning: Sequential_File_2: When checking operator: When binding output interface field "stock_num" to field "outField": Conversion from source type "string[max=10]" to result type "decimal[1,0]": Possible range limitation.
Error After that: Sequential_File_2,0: Un-handled conversion error on field "stock_num " from source type "string[max=10]" to destination type "int64":
source value="100"; the result is non-nullable and there is no handle_null to specify a default value.
outField:int64=decimal_from_string(stock_num) but not working.
Warning: Sequential_File_2: When checking operator: When binding output interface field "stock_num" to field "outField": Conversion from source type "string[max=10]" to result type "decimal[1,0]": Possible range limitation.
Error After that: Sequential_File_2,0: Un-handled conversion error on field "stock_num " from source type "string[max=10]" to destination type "int64":
source value="100"; the result is non-nullable and there is no handle_null to specify a default value.