Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: TRIM and SUBSTR not working

Re: TRIM and SUBSTR not working

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Thu, 10 Feb 2005 11:10:49 -0600
Message-ID: <1108055179.48766e3c86059d36d388d70aed4e00db@teranews>


Matthias Wirtz <Matthias.Wirtz_at_gmx.net> wrote:

>Hi,
>
>I jus wonder why TRIM and SUBSTR are not working on one Oracle9i database
>server:
>
>SQL*Plus: Release 9.2.0.1.0 - Production on Thu Feb 10 11:47:01 2005
>
>Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
>
>
>Connected to:
>Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
>With the Partitioning, OLAP and Oracle Data Mining options
>JServer Release 9.2.0.1.0 - Production
>
>stat_at_STAT2> select TRIM('Hello ') o from dual;
>
>O
>---------------------------
>Hello
>
>
>
>You see that the string is not trimmed. I would expected (and actually it is
>on a different box) the output like this:
>
>O
>-----
>Hello
>
>
>Same happen with SUBSTR, doesn't work. But why is this different? Are there
>any default sql*plus settings that I'm not aware off?

I cannot reproduce the problem..



SQL*Plus: Release 9.2.0.1.0 - Production on Thu Feb 10 11:08:07 2005

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.2.0 - Production

SQL> select trim('Hello ') from dual;

TRIM(



Hello

SQL> select substr('thislongstring',2,4) from dual;

SUBS



hisl

SQL>


No setting in SqlPlus have been modified..'out-of-the-box' client install. Received on Thu Feb 10 2005 - 11:10:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US