Page 1 of 1

remove space

Posted: Tue Feb 12, 2008 4:22 am
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

Posted: Tue Feb 12, 2008 4:42 am
by ArndW
Trim() will only work with VarChar() data, not with Char().

Posted: Tue Feb 12, 2008 5:02 am
by basu.ds
yes varchar data only.if i use trim also it is not giving now

Posted: Tue Feb 12, 2008 5:09 am
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?

Posted: Tue Feb 12, 2008 5:19 am
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 .

Posted: Tue Feb 12, 2008 5:24 am
by basu.ds
i got thanks alot

Posted: Tue Feb 12, 2008 6:20 am
by asitagrawal
time to mark the topic as "Resolved" please :)

Posted: Tue Feb 12, 2008 6:25 am
by ray.wurlod
In future one question per thread please. It aids future searchers.