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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: LTRIM & RTRIM

Re: LTRIM & RTRIM

From: Stephane Faroult <sfaroult_at_roughsea.com>
Date: Mon, 21 Mar 2005 08:45:56 +0100
Message-ID: <423E7BB4.6090102@roughsea.com>


Day formats have a fixed length:

  1 select to_char(mydate, 'DAY') "DAY",

  2 length(to_char(mydate, 'DAY')) "LENGTH"

  3 from (select sysdate + rownum - 1 mydate

  4 from v$parameter

  5* where rownum <= 7)

SQL> / DAY LENGTH

MONDAY 9 TUESDAY 9 WEDNESDAY 9 THURSDAY 9 FRIDAY 9 SATURDAY 9 SUNDAY 9 7 rows selected.

Kean Jacinta wrote:

>Need some clarification here.
>
>WHILE V_FROMDate <= TODATE LOOP
> IF RTRIM(TO_CHAR(V_FROMDate,'DAY'))='SATURDAY' THEN
> V_Count := V_Count + 1;
> END IF;
> V_FROMDate := V_FROMDate +1;
>
>When i use RTRIM --it will generate correct result ,
>if i use LTRIM then the system will return 0.
>
>Aren't RTRIM and LTRIM sort of the same ?
>
>PLs help up . THank u
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Small Business - Try our new resources site!
>http://smallbusiness.yahoo.com/resources/
>--
>http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Regards,

Stephane Faroult

RoughSea Ltd
http://www.roughsea.com


--
http://www.freelists.org/webpage/oracle-l
Received on Mon Mar 21 2005 - 02:49:31 CST

Original text of this message

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