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

Home -> Community -> Usenet -> c.d.o.misc -> Re: TRUNC equivalent to return the decimal part?

Re: TRUNC equivalent to return the decimal part?

From: Noel <tbal_at_go2.pl>
Date: Thu, 10 Apr 2003 13:22:10 +0100
Message-ID: <b73k9p$4n8$1@inews.gazeta.pl>

Uzytkownik "funkia" <yian_at_die.net> napisal w wiadomosci 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)

for example:
 SELECT MOD(36.675,1) FROM DUAL;

--
Noel





-- 
Serwis Usenet w portalu Gazeta.pl -> http://www.gazeta.pl/usenet/
Received on Thu Apr 10 2003 - 07:22:10 CDT

Original text of this message

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