VARCHAR TO BIGINT
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 32
- Joined: Tue Dec 20, 2011 8:03 am
VARCHAR TO BIGINT
HI,
MY JOB :
TDSTAGE -----> XFM---> TDSTAGE
MY SOUCE COLUMN DATATYPE IS VARCHAR
TARGET COLUMN DATATYPE IS BIGINT
I went through dsxchange forum. some body is telling that no conversion is required.But in my case it is not working.
I want to change the target datatype in datastage level.
Is it right way?
MY JOB :
TDSTAGE -----> XFM---> TDSTAGE
MY SOUCE COLUMN DATATYPE IS VARCHAR
TARGET COLUMN DATATYPE IS BIGINT
I went through dsxchange forum. some body is telling that no conversion is required.But in my case it is not working.
I want to change the target datatype in datastage level.
Is it right way?
-
- Participant
- Posts: 5
- Joined: Sun Dec 26, 2010 12:08 am
- Location: bangalore
Re: VARCHAR TO BIGINT
Conversion is not required for your senario.
we can't convert integer to varchar.
we can't convert integer to varchar.
adsasad
Re: VARCHAR TO BIGINT
a) yes it issrinivasudatastage wrote:Conversion is not required for your senario.
we can't convert integer to varchar.
b) yes you can
ps. they're going the other way (varchar to bigint)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
Re: VARCHAR TO BIGINT
use the derivationsrivalli_b wrote:TDSTAGE -----> XFM---> TDSTAGE
MY SOUCE COLUMN DATATYPE IS VARCHAR
TARGET COLUMN DATATYPE IS BIGINT
Code: Select all
If IsValid("int64",Trim(input.column)) Then Trim(input.column) Else SetNull()
- Zulfi
-
- Participant
- Posts: 32
- Joined: Tue Dec 20, 2011 8:03 am
-
- Premium Member
- Posts: 730
- Joined: Tue Nov 04, 2008 10:14 am
- Location: Bangalore
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You are getting the "correct" value as far as the computer is concerned. What you are seeing is an example of the condition called arithmetic overflow, where the unsigned number is large enough to turn on the most significant bit, causing the signed number to be represented as negative.
A quick fix for some cases would be to change the target data type to uint16 rather than int16. However 978972 is too big even for uint16. You need at least int32 to store this string as an integer data type.
A quick fix for some cases would be to change the target data type to uint16 rather than int16. However 978972 is too big even for uint16. You need at least int32 to store this string as an integer data type.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.