3 Replies Latest reply on Mar 24, 2015 12:23 PM by BKBK

    Issue with QoQ - Posting for a developer

    Joe Chittick_625

      Just a heads up, I am a network guy posting for one of our developers who is too busy to take this on himself.


      We were running a CF 9 production application and recently updated to CF 11. There are a few QoQ's that are now broken since the update.


      I am not going to pretend like I know what I am talking about, but in CF 9, the following query returns the correct results, Toyota and Honda. In CF 11, it does not and we think its because the "TYT" and "HND" have trailing spaces.


      <cfset list=queryNew("code,description","varchar,varchar")>


      <cfset queryAddRow(list)>

      <cfset querySetCell(list,"code","TYT ")>

      <cfset querySetCell(list,"description","Toyota")>


      <cfset queryAddRow(list)>

      <cfset querySetCell(list,"code","HND ")>

      <cfset querySetCell(list,"description","Honda")>


      <cfset queryAddRow(list)>

      <cfset querySetCell(list,"code","HMMR ")>

      <cfset querySetCell(list,"description","Hummer")>


      <cfset queryAddRow(list)>

      <cfset querySetCell(list,"code","CHVLT")>

      <cfset querySetCell(list,"description","Chevrolet")>


      Data inside the "list" table.


      <table border="1" cellspacing="0" cellpadding="4">



      <td>Code Length</td>



      <cfoutput query="list">








      <br /><br />

      Select * from list where code='TYT' or code='HND'

      <br /><br />In ColdFusion 6, the above query will give you Toyota and Honda, but in ColdFusion 11, it will not give you any results.

      <br /><br />

      Query Result:

      <cfquery name="tyt" dbtype="query">

      Select * from list where code='TYT' or code='HND'



      <cfdump var="#tyt#">


      Thanks in advance!