How to place alphanumeric in between an integer

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Prince_Hyd
Participant
Posts: 35
Joined: Mon May 06, 2013 5:59 am

How to place alphanumeric in between an integer

Post by Prince_Hyd »

Hi Folks

i have an input like this

Num

74584578845
73432848874
40594589485

i want to place '-' after third position.So output should be like

Num

745-84578845
734-32848874
405-94589485


Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Substring the value apart (or use Left/Right) and concatenate back together adding that character between the two pieces.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Prince_Hyd
Participant
Posts: 35
Joined: Mon May 06, 2013 5:59 am

Post by Prince_Hyd »

Hi

can you explain in detail please.



Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What detail do you need? It's not substantially different from your other recent post with the capitals. And your target will no longer be an integer of course, so first convert the source to a string and then proceed with the chopping upping.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply