Hi All,
I have a scenario where I need to convert Char(20) field to Bigint fiel
I tried to do it using Modify stage
Specification Newcolumn:int64=oldcolumn
The job is finishing with warning but the data is not getting populated after Modify stage.
The warning is as below
TRNS_req_attributes: When checking operator: On output data set 0: When binding output schema variable "APT_TRoutput0Rec0": When binding output interface field "Tag1GST_I" to field "GST_I": Implicit conversion from source type "string[20]" to result type "int64": Converting string to number.
Thanks in Advance
How to convert Char(20) to Bigint
Moderators: chulett, rschirm, roy
The implicit conversion cannot deal with spaces, which your CHAR() column most certainly has. I would use an explicit TRIM and StringToDecimal call to avoid all warnings and errors. I am not at a DataStage computer where I can check the syntax of these calls, but the Parallel Job Developers guide will have some examples for the modification stage syntax and conversion calls.
Code: Select all
AsInteger(TrimLeadingTrailing(InPutColumn))
Code: Select all
StringToDecimal(TrimLeadingTrailing(InPutColumn))
Regards
LakNar
LakNar
-
- Participant
- Posts: 94
- Joined: Fri Dec 14, 2007 3:22 am