Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2009-07-29 : 05:28:23
|
| while am using rtrim, ltrim in particular field to filter the space at both end. some of the columns wont get filtered. is there any to remove the space. rather than using this.eg:column name:"command"column value:"hai "query: select rtrim(ltrim(command)) from mytableresult: "hai "thankssubha |
|
|
Mangal Pardeshi
Posting Yak Master
110 Posts |
Posted - 2009-07-29 : 05:48:59
|
| Subha,What do you mean by " some of the columns wont get filtered"?I guess rtrim(ltrim(command)) is the only option you have.Mangal Pardeshihttp://mangalpardeshi.blogspot.com |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-29 : 06:23:47
|
it might not be space but some non-printable char like CR or LF. RTRIM() will not remove these. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2009-07-30 : 00:28:24
|
| then how to filter that non-printable characters?thankssubha |
 |
|
|
GhantaBro
Posting Yak Master
215 Posts |
Posted - 2009-07-30 : 00:31:33
|
| do replace for all the char khtam suggested with nothing.... |
 |
|
|
subhaoviya
Posting Yak Master
135 Posts |
Posted - 2009-07-30 : 00:39:59
|
| hai friends i did that one. thanks khtan, you are exactly write, the char is CR. i used the replace methodreplace(replace(replace(myfield,char(10),''),char(13),''),char(9),'')thanks friends......... |
 |
|
|
|
|
|