Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: ltrim() in Oracel 8.1.6
"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