You need to do this: <cfset tax = subtot * (tx / 100) />
This actually converts the tx to a decimal. Also you don't need the #s in the cfset. :) Steve -----Original Message----- From: Rick Sanders [mailto:c...@webenergy.ca] Sent: Thursday, February 10, 2011 9:14 AM To: cf-talk Subject: decimals and variables Hey all, I'm pulling up an integer from the database which is 15. This is a tax rate, so I need to get the tax on the subtotal. Say the #subtot# is 100 and #tx# is 15. <cfset tax = #subtot# * .#tx#> This should bring back the number 15. However, cf is throwing an error because of the decimal in front of the #tx#. <cfset tax = #subtot# * .15> This works. However I need to pull from the database in case the tax rate changes. Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342102 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm