Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
T-SQL
»
LTRIM/RTRIM NOT TRIMMING
LTRIM/RTRIM NOT TRIMMING
Rate Topic
Display Mode
Topic Options
Author
Message
eletuw
eletuw
Posted Friday, December 12, 2003 9:24 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:21 AM
Points: 144,
Visits: 272
I use ltrim and rtrim in select statement but the output is not trimmed. The variable are all of datatype varchar.
select ltrim(rtrim(org_name)),ltrim(rtrim(org_code)) from tableA
Does any one know what is happenning.
Thanks for your help.
Post #19161
ThomasH
ThomasH
Posted Friday, December 12, 2003 9:42 AM
Old Hand
Group: General Forum Members
Last Login: Tuesday, March 29, 2005 2:31 PM
Points: 393,
Visits: 1
Can you post the results of
select TOP 1 '-' + ltrim(rtrim(org_name)) + '-'
from tableA?
Might also have some unprintable or CR/LF data embedded.
(Preview of this post removed the plus signs from each side of the LTRIM(...) )
Once you understand the BITs, all the pieces come together
Post #91071
eletuw
eletuw
Posted Friday, December 12, 2003 9:56 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:21 AM
Points: 144,
Visits: 272
I think the problem in QA is setting the option to have column aligned in the result tab.
Thanks for your response.
Post #91072
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.