The input column is defined as INP_Col, char(30). The output column which is mapped to INP_COL column is also defined as char(30). I am confident that both input and output columns would contain only numeric value. I need to subtract an integer value from the input column (INP_Col,char data type) and store the result in the output. I am unable to get the desired output.
for example if the transformer derivation is
DSLink1.INP_Col - 5
The output is -5.
I thought DS would perform implicit conversion from char to int, subtract and give me the correct output. However, I don't think this is happening in this case. I used modify stage with
specification : CN1:int16 = lookup_int16_from_string (INP_Col) to convert this to integer and tried the calculation. Also tried other type conversion from Modify stage conversion table. But nothings works for this simple scenario. Can anybody please help me to fix this...
Simple conversion (char to int) and calculation
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 75
- Joined: Thu Nov 27, 2008 10:12 am
Try this.
Code: Select all
CN1:int16=INP_Col
-
- Participant
- Posts: 75
- Joined: Thu Nov 27, 2008 10:12 am