how to elimanitate space

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
suneel kumar
Participant
Posts: 4
Joined: Fri Mar 03, 2006 4:31 am

how to elimanitate space

Post by suneel kumar »

Hi,

in the source date like "suneel reddi" but i want output like "suneelreddi"

pls give me sucessions.

thanks in advance

suneel
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

You can use EReplace function to eliminate space.

--Balaji S.R
balajisr
Charter Member
Charter Member
Posts: 785
Joined: Thu Jul 28, 2005 8:58 am

Post by balajisr »

Code: Select all

str = EReplace(str," ","")
should work fine.

--Balaji S.R
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Suneel

As Balaji mentioned you can use Ereplace function to replace space.

Syntax:
Ereplace(InputValue,' ','')

Example
Ereplace('suneel reddi',' ','')

Result : suneelreddi


Regards
Regards
Siva

Listening to the Learned

"The most precious wealth is the wealth acquired by the ear Indeed, of all wealth that wealth is the crown." - Thirukural By Thiruvalluvar
suneel kumar
Participant
Posts: 4
Joined: Fri Mar 03, 2006 4:31 am

Thanks Balaji

Post by suneel kumar »

rasi wrote:Suneel

As Balaji mentioned you can use Ereplace function to replace space.

Syntax:
Ereplace(InputValue,' ','')

Example
Ereplace('suneel reddi',' ','')

Result : suneelreddi


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

Post by ArndW »

Use the convert function to remove all spaces, i.e.

Code: Select all

Convert(' ','',In.Col)
. It will only convert one char to another so is more limited than EREPLACE, but it is more efficient.
srimitta
Premium Member
Premium Member
Posts: 187
Joined: Sun Apr 04, 2004 7:50 pm

Post by srimitta »

Suneel,

"suneel reddi" = Trim("Remove..all..Spaces....", " ", "A")
* ...returns "suneelreddi"


Trim("suneel reddi"," ","A") Returns "suneelreddi"

Goodluck
Mitta
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

OR :lol:
you could just use the transform functioni "LETTERS()"

eg LETTERS(suneel reddi) is going to return you "suneelreddi"

Cheers :P
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply