Hi, Greg... see my response to Williams for the code... Rick
> -----Original Message----- > From: Greg Morphis [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 01, 2007 1:14 PM > To: CF-Talk > Subject: Re: How to break down a number into percentages > > Can you provide the code you're using to store those numbers?... if > the data type is correct, then maybe it's how it's breaking the number > down and storing it in the DB that needs some work. > > On Nov 1, 2007 11:39 AM, Rick Faircloth <[EMAIL PROTECTED]> wrote: > > Hi, all. > > > > I know that sounds simple and, as it's stated, it is. > > > > However, what I'm trying to accomplish turns out to be more > > complicated that I thought. > > > > I want to take a dollar amount, break it down by various percentages > > (that should total 100%), then place the dollar amounts into various > > accounts and have the total placed into those accounts equal the > > original amount that was broken down by the percentages. > > > > I've been trying every function I could find including decimal, round, > > various math equations, to achieve the goal, but it's not working. > > > > The data type in myself is decimal, set to 2 places, but invariably, > > if I take $100 and run it through the breakdown and place the amounts > > into the accounts, then add the dollar figures places into the accounts, > > the total comes back $97.00. Not only that, but all dollar amounts ending > > up in the database are whole dollar amounts with not cents. > > > > Anybody have any clues how this should be approached? > > > > If the description above is not sufficient, I can give some concrete > > examples with actual numbers, but I figured someone had tackled > > something like this before. > > > > Thanks, > > > > Rick > > > > PS - I am on CF 8 now, so every solution is in play! :o) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Get the answers you are looking for on the ColdFusion Labs Forum direct from active programmers and developers. http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292494 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

