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 |
|
real_pearl
Posting Yak Master
106 Posts |
Posted - 2004-08-09 : 06:52:51
|
| RTRIM is not removing the speaces. And when I usedSTUFF(field, LEN(field), 1, '') it worked fine. But the values which does not have space it removes the last character. How I may overcome this problem please tell me. |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-08-09 : 07:05:00
|
| select rtrim('andrew '), len(rtrim('andrew '))select rtrim('andrew'), len(rtrim('andrew'))what do you get when you execute the two above?are you putting the result from your queries into another table????...another table defined as CHAR? |
 |
|
|
real_pearl
Posting Yak Master
106 Posts |
Posted - 2004-08-09 : 07:14:58
|
| i am pick table_name from a field that stores table_name, and dynamically generates the SQL statement. but when I pick the table_name and concatenate it with a field_name like thistable_name.field_name it does not do this while it make it something like thisselect * from table where table .field_name = 'ABC'i want to remove these spaces. |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2004-08-09 : 08:27:04
|
| maybe you have an extra space in the dynamic sql before a . like table_name + ' .' + filed_name???Go with the flow & have fun! Else fight the flow :) |
 |
|
|
|
|
|