AlphaNumaric string

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
jagadish9
Participant
Posts: 10
Joined: Sat Jun 10, 2006 10:16 am

AlphaNumaric string

Post by jagadish9 »

HI,

I have input string as alphanumeric string which is ex: xxyyzz1212xxx.
I want o/p like 1212.

we can do this in Server job using oconv. can we do this in parallel jobs.
can any one help me?
miwinter
Participant
Posts: 396
Joined: Thu Jun 22, 2006 7:00 am
Location: England, UK

Post by miwinter »

You could employ a BASIC transformer stage to access the same logic as you would use in a server job to achieve it - note the potential performance implication however.
Mark Winter
<i>Nothing appeases a troubled mind more than <b>good</b> music</i>
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

convert() can do the trick.

Code: Select all

convert(<all alphabets>,'',<input column>)
this will remove alphabets from the input string and you will be left with numeric values.


EDIT : added code and line below it.
Last edited by priyadarshikunal on Fri May 29, 2009 10:25 am, edited 1 time in total.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:idea: If you are going to suggest something, please break the Magician's Code and explain how to make the 'trick' work at the same time.
-craig

"You can never have too many knives" -- Logan Nine Fingers
jagadish9
Participant
Posts: 10
Joined: Sat Jun 10, 2006 10:16 am

Post by jagadish9 »

Convert is working for this.....


Thanks for the Help
Post Reply