TRUNC equivalent to return the decimal part?

From: funkia <yian_at_die.net>
Date: 9 Apr 2003 15:00:21 -0700
Message-ID: <550d192c.0304091400.3a0bb654_at_posting.google.com>



[Quoted] [Quoted] 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 [Quoted] 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)

[Quoted] 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 - 00:00:21 CEST

Original text of this message