Replace numeric 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
Tasneem
Participant
Posts: 8
Joined: Thu Aug 11, 2005 12:29 am

Replace numeric string

Post by Tasneem »

Hi ,

I have a requirement where I need to trim any numeric occurence in a string.

For eg: "abc2def6rg"
should be made :"abcdefrg"

The length of numeric string at any occurence is variant.
I thought Ereplace function wud help,but for this requirement it is not of much use.

Thanx,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you only wish to remove numeric digits from the string, you can do a

Code: Select all

CONVERT('01223456789','',In.String)
. This will strip out the digits 0-9 in your string.
Post Reply