couple of questions.

1.  Your dB column, is it set to 'decimal 2' or is it set to 'decimal 
[#],2'
2.  When you add up the numbers from the dB, are you converting them 
to integers before adding them up?
3.  If the above are not the issue, can you please post the code so we 
can find the issue?

William

-----Original Message----
-From: [EMAIL PROTECTED]
-Date: Nov 1, 2007 8:39 
-To: "CF-Talk"<cf-talk@houseoffusion.com>
-Subj: How to break down a number into percentages
-
-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)
-
-
-
-


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292485
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to