Numeric part extraction

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Numeric part extraction

Post by karry450 »

Hi Friends,


My input data is VARCHAR 255 ( ASFG1J3K88U7) and I want to extract only the numeric numbers from above input as ( 13887) as output of it to target table .

Can anyone help me on this.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use the DIGITS Transform. This is precisely what it does.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

ray.wurlod wrote:Use the DIGITS Transform. This is precisely what it does. ...
Hi Ray Can please elobarate on this.
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

And also can you please help me if I want get only the alphabets out of the string
karry450
Participant
Posts: 201
Joined: Wed Nov 14, 2007 11:31 pm
Location: HYD

Post by karry450 »

karry450 wrote:And also can you please help me if I want get only the alphabets out of the string
THANKS Ray I hat got the output
for alphabets I used LETTERS
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly. And if you look at the transform code you'll see they're both just wrappers for the OConv function, something that's easier to remember and self-documenting.

Please mark your post as Resolved using the button at the top of the page.
-craig

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