Tue 20 Nov 2007
Unfortunately I had to learn the hard way about the CF_SQL_DECIMAL option of cfqueryparam rounding my decimals off in SQL. I had used it for inserting, then after a while noticed my decimal places were being rounded (3.50 rounds to 4.00) in the database. Come to find out I needed to use CF_SQL_FLOAT instead.
Am I misunderstanding what a decimal is? Does anyone have a good explanation for this? I understand that CF_SQL_FLOAT is the “proper” option, but never thought there was much difference. If nothing else hopefully this helps someone or keeps them from making the same mistake, especially since money can be of type float ![]()

January 7th, 2008 at 1:01 pm
I can’t answer your question as to why cf_sql_decimal is no good, but I do appreciate you making this post! I was came across the same problem when I upgraded from CF 7 to CF 8 and I’m glad I was able to fix it just now.
January 18th, 2008 at 11:52 am
When using the cf_sql_decimal parameter, you must also specify the scale parameter.
Scale has a default value of zero, hence the rounding.
http://livedocs.adobe.com/coldfusion/6.1/htmldocs/tags-b20.htm
January 18th, 2008 at 1:11 pm
Ahh, makes much better sense now! Thanks!
February 12th, 2008 at 6:38 pm
I am in CF7 and have something different happening using CF_SQL_FLOAT to an Oracle NUMBER column. If I pass 7.36 through the param, Oracle ends up with 7.3600000000000003. My only solution was to use CF_SQL_DECIMAL, but I set the scale to 50 and worked fine… but the float thing left me scratching my head.