Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: CAST vs. TO_NUMBER or TO_CHAR or TO_DATE or ...
Looks useful for figuring out things like elapsed time. No doubt there
are other ways to do the same thing and I'm sure there are many other uses
for cast. I'm glad to have been made aware of this function.
David
lpad(extract(day from objtime.diff_time),5) days, lpad(extract(hour from objtime.diff_time),2,'0')||':'|| lpad(extract(minute from objtime.diff_time),2,'0')||':'|| lpad(extract(second from objtime.diff_time),2,'0') timefrom
On 10/11/07, Jared Still <jkstill_at_gmail.com> wrote:
> On 10/11/07, Rumpi Gravenstein <rgravens_at_gmail.com> wrote:
> >
> > I've been looking at the Oracle CAST function vs. a TO_NUMBER or TO_CHAR
> > or .... Where both the CAST and TO_ functions result in equivalent answers,
> > is there a preferred choice?
> >
> >
>
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Oct 11 2007 - 12:58:08 CDT
![]() |
![]() |