Re: TRUNC equivalent to return the decimal part?

From: nobody <nobody_at_nowhere.com>
Date: Thu, 10 Apr 2003 01:58:38 GMT
Message-ID: <id4la.85784$7Im.35450_at_news04.bloor.is.net.cable.rogers.com>


math tells me
you want value-trunc(value)

"funkia" <yian_at_die.net> wrote in message news:550d192c.0304091400.3a0bb654_at_posting.google.com...
> I've been searching Google and other docs online for a while now, and
> have been unable to find any built-in function that resembles what I
> need. I have a calculated number result for which I need to do a
> conversion on the decimal part of the number. Is there any function
> in SQL that is like TRUNC that returns just the decimal portion?
>
> e.g., if my number is 36.675, I want a function that will return just
> .675 (with or without the period)
>
> I know that it's possible to do this with either of the following:
> 1. decimal = number - trunc(number)
> OR
> 2. substr
>
> However, my calculated number is created from a complex expression in
> itself that I would rather not wrap more functions are. It seems that
> there has to be an elegant and simple way to achieve this -
> suggestions?
>
> Thanks!
Received on Thu Apr 10 2003 - 03:58:38 CEST

Original text of this message