Page 1 of 1

string to integer conversion

Posted: Tue Oct 26, 2010 2:05 am
by kalpanam
Hi,

Can any please let me know how to convert string to integer datatype.I know that Datastage implicitly convert the string datatype tp integer datatype without any external function but i'm not getting accurate data in the output.

For example:

I have cust_key(varchar(40) as input and its value 30066293603
and the output is coming as 2147483647 by giving cust_key(integer).

In the source i'm having 11digit value and in the output it is getting as 10digit value.

Please any of you let me know the solution.

Thanks & Regards,
Kalpana.

Posted: Tue Oct 26, 2010 4:56 am
by rohithmuthyala
Make the output column datatype Bigint. It should solve your problem.!

Posted: Tue Oct 26, 2010 7:14 am
by ray.wurlod
The largest possible signed four byte integer is 2147483647. Unsigned integer can be twice this size only. Prefer to use eight byte integer (BigInt) if your values are larger than the limit allowed for four-byte.