Page 1 of 1

Query regarding AsInteger function

Posted: Sat Dec 01, 2007 7:23 am
by suchit1983
Hi,

I have a input data Varchar(24) coming as 214584654200708086120001.
I need the output as Integer(24).

I tried using AsInteger function. But, the output is giving me a completely different number.

Please provide a solution for this....

Re: Query regarding AsInteger function

Posted: Sat Dec 01, 2007 9:20 am
by pavankvk
suchit1983 wrote:Hi,

I have a input data Varchar(24) coming as 214584654200708086120001.
I need the output as Integer(24).

I tried using AsInteger function. But, the output is giving me a completely different number.

Please provide a solution for this....
forget about datastage, integer can only have 2147483647 as max value. AsInteger function will not work for values more than this. i doubt if long or bigint will work either

what kind of a number is this 24 byte value.i mean what business requirement can be like that..chek your requirement.

Posted: Sat Dec 01, 2007 12:38 pm
by ray.wurlod
Please advise what database supports Integer(24) as a data type.
If there is none (as I believe), why do you require it?

The largest integer data type supported by DataStage is BigInt (or int64), the maximum value of which is 9,223,372,036,854,775,807 (only 19 digits, or 20 digits for uint64).