i want to increase the varchar value

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

i want to increase the varchar value

Post by pavankatra »

Hi,
Input value is: FFFFE8627324488
i want output as

FFFFE8627324489
FFFFE8627324490
FFFFE8627324491
FFFFE8627324492

so anyone please suggest me how to do this in datastage.

Thanks in advance.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

this seems to be a hexadecimal value instead of just increasing 1 like in decimal. Is that the case?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

priyadarshikunal wrote:this seems to be a hexadecimal value instead of just increasing 1 like in decimal. Is that the case?
thanks for your post.

its a varchar datatype in the database.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

I am not asking about the datatype but I am asking about type of value stored in that column.

If you want to do as you mentioned in first post you should first check these things

'FFFFE' is just a prefix or its a hexadecimal value.
will the last 10 values always be digits?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

priyadarshikunal wrote:I am not asking about the datatype but I am asking about type of value stored in that column.

If you want to do as you mentioned in first post you should first check these things

'FFFFE' is just a prefix or its a hexadecimal value.
will the last 10 values always be digits?
Thank you
actul requirement is
i need to generate the seqventially incremental number for 'x' column
that column is having data FFFFE8627324488B81035F2D16C26358
like the way.
so i want to split the first 15 digits and increase one and concatinate those .

so could you please tell me how can i acheive this in datastage.

thanks in advance.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

So what comes after FFFFE8627324488B81035F2D16C99999 ?
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

Sainath.Srinivasan wrote:So what comes after FFFFE8627324488B81035F2D16C99999 ?
so can you please suggest me what i need to do

i need to generate the unique number for that every time.

please help me out in this.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Substring, conversion, math, conversion, concatenation. Probably in a Transformer with stage variables.
-craig

"You can never have too many knives" -- Logan Nine Fingers
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post by pavankatra »

chulett wrote:Substring, conversion, math, conversion, concatenation. Probably in a Transformer with stage variables. ...
if u dontmind can you please elobratye it.

i am not able to understand.

thanks for your replies.
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

So, Does this means the value is kind of hexadecimal surrogate key which you need to increament for each record passed?
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
Post Reply