Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save trycf/376f103f0c6636e5f9e6d911add7dbd6 to your computer and use it in GitHub Desktop.
Save trycf/376f103f0c6636e5f9e6d911add7dbd6 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
q1 = QueryNew("id,dec", "integer,decimal");
q1.addRow({id: 1, dec: 5.57});
q2 = QueryNew("id,str", "integer,varchar");
q2.addRow({id: 1, str: "testing"});
q3sql = "
select *
from q1, q2
where q1.id = q2.id
";
q3 = QueryExecute(q3sql, {}, {dbtype: "query"});
// q3.dec should be 5.57. It is 6 instead.
writeDump(q3);
q1 = QueryNew("id,dec", "integer,double");
q1.addRow({id: 1, dec: 5.57});
q2 = QueryNew("id,str", "integer,varchar");
q2.addRow({id: 1, str: "testing"});
q3sql = "
select *
from q1, q2
where q1.id = q2.id
";
q3 = QueryExecute(q3sql, {}, {dbtype: "query"});
// q3.dec should be 5.57. It is 6 instead.
writeDump(q3);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment