Page 1 of 1

Convert String to Integer without using OCONV & ICONV

Posted: Thu Mar 03, 2011 5:50 am
by mac4rfree85
Hi Guys,

I want to convert a String Field to Decimal. But my project guidelines are not allowed to use OCONV & ICONV functions..

I tried using Seq function but it converts it to Numeric code value instead of Numeric value..

can somebody help me in this..

Cheers!!!!

Posted: Thu Mar 03, 2011 6:52 am
by ray.wurlod
Two alternatives, off the top of my head.

1. Just do nothing. There are no data types in server jobs anyway.

2. Add zero to it (or perform any other arithmetic operation such as multiplying or dividing by 1). That will also remove leading and trailing non-significant zeroes.

Posted: Thu Mar 03, 2011 7:09 am
by mac4rfree85
Ya Ray,, there was no need to transform it like in the case of Parallel..

It worked out for me.. :)