I have a simple query in a CFC:
<cfquery name="getOD" datasource="#request.dsn#" username="#request.username#" password="#request.password#">
SELECT DISTINCT machineName
WHERE od = <cfqueryparam cfsqltype="cf_sql_decimal" value="#arguments.od#">
ORDER BY machineName;
which will sometimes return 0 results when there are clearly matches. If I change the cfsqltype to CF_SQL_VARCHAR, it works fine, but that defeats the purpose of defining a datatype. An example of a value that returns the correct result is 4.134. One that does not is 3.937.
I have tried using tht CF_SQL_FLOAT datatype and that doesn't work either. I'm using MySQL 5 as my DBMS. Any thoughts?