SqlDbx Forum

SqlDbx

You are not logged in.

#1 2011-09-09 07:09:34

timeco
Member

RTRIM problem?

Hi,

I'm not sure where's the problem but I fail to RightTrim a string (tested both with SET ANSI_PADDING ON/OFF). Try executing a simple query like:

SELECT RTRIM('352561 ') and you will get an invalid result: '352561 '  (string is not trimmed)


Correct results are shown only with this query:

SELECT CAST(RTRIM('352561 ') AS CHAR(6))


Can anyone direct me to the solution please?

Thx guys

Offline

#2 2011-09-09 10:10:56

sqldbxhelp
Administrator

Re: RTRIM problem?

I am unable to reproduce this behavior. It works as expected
What server version are you using?

Offline

#3 2011-09-13 08:54:04

timeco
Member

Re: RTRIM problem?

Hi,

I'm using version:
Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86)
Standard Edition on Windows NT 5.2 (Build 3790: Service Pack 2)

Any ideas?

Offline

#4 2011-09-13 22:37:43

sqldbxhelp
Administrator

Re: RTRIM problem?

Does this happen only in SqlDbx? What about SMSS?

Offline

#5 2011-09-14 03:01:37

timeco
Member

Re: RTRIM problem?

I checked, it only happens in Sqldbx...

Offline

#6 2011-09-14 14:15:20

sqldbxhelp
Administrator

Re: RTRIM problem?

This will have to be investigated.
What version of SqlDbx you use and what connection type?

Offline

#7 2011-09-15 03:18:18

timeco
Member

Re: RTRIM problem?

Hi,

I finally solved the issue by completely closing down the connection (I can't remember the last time I actually closed the connection, I just used reconnecting in Sqldbx)...  and connecting again. After that, I could not reproduce this problem, it's working fine fornow! Very strange...

If it helps, I'm using:

  • Sqldbx version 3.50 Professional Edition

  • Driver load order: SQL Server Native Client 10.0, SQL Native Client

  • DBMS type: Microsoft SQL Server

Offline

Board footer

Powered by FluxBB