Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: LTRIM & RTRIM
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-lReceived on Mon Mar 21 2005 - 02:49:31 CST