remove 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
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

remove space

Post by basu.ds »

Hi can any one help me how to remove space in a string. i know trim function.but it is not working.remove function is there but how to use it?delimeter is space but it is not taking.
ex;string is like bang lore
i want banglore:i used like this remove(string,' ') it is not working
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Trim() will only work with VarChar() data, not with Char().
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

yes varchar data only.if i use trim also it is not giving now
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If you have a VarChar and the TRIM() result looks like it still has spaces then odds are you don't have spaces. Try writing the result of "Convert(' ','?',In.Column) to a peek stage - do you see question marks or spaces?
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

thanks alot,still i heve one more query that i have a transaction data withoutspaces i need to make lookup with master data which might be exist with spaces so that is the case look up will fail how can i prevent this situaation actually this is my requirement .
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

i got thanks alot
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

time to mark the topic as "Resolved" please :)
Share to Learn, and Learn to Share.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

In future one question per thread please. It aids future searchers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply