On 7/28/05, Daniel Kessler <[EMAIL PROTECTED]> wrote: > howdy folks - hope your week is going fine. > > I have an Oracle database table with a column defined as such: > gs_price NUMBER, > > and I enter it using: > .... > SET > gs_price = <cfqueryparam value="#Form.gs_price#" cfsqltype="CF_SQL_NUMERIC">, > .... > > Unfortunately, when I enter 2.50, it truncates the number to 2.5. > It's a price so I need to keep it 2.50. I suppose that I could just > format it correctly after I get it but I was hoping to have it > correct in the DB. >
You will need to use the "scale" attribute of the cfqueryparam tag to keep the decimal place if you are going to be using cf_sql_numeric: <cfqueryparam value="#Form.gs_price#" cfsqltype="cf_sql_numeric" scale="2" /> Regards, Dave. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213102 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

