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: ltrim() in Oracel 8.1.6

Re: ltrim() in Oracel 8.1.6

From: Guido Konsolke <NoSpam_at_MyAccount.com>
Date: Tue, 23 Apr 2002 08:50:11 +0200
Message-ID: <1019544503.891607@news.thyssen.com>


"zhuwang" <zhuwang_at_yahoo.com> wrote:
> here are the output of several ltrim(), I really don't understand what
> is the purpose of ltrim(). How can I get the following results?
> Need your help and thanks.
>
> SQL> select ltrim('ascsa','asc') from dual;
> L
> -
> SQL> select ltrim('asssssc','asc') from dual;
> L
> -
> SQL> select ltrim('asssssc','csa') from dual;
> L
> -

Hi,
LTRIM checks the first string from the start if the character appears in the second string. If so, the character will be removed. The search ends when the first character is detected that is not contained in the second string.

In your examples LTRIM returns NULL because every character of the first string is part of the second one.

hth,
Guido Received on Tue Apr 23 2002 - 01:50:11 CDT

Original text of this message

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