7 Replies Latest reply on Jun 28, 2014 10:40 AM by BKBK

    A strange query of queries bug in CF11?

    minli98 Level 1

      Hi,

       

      I have this strange query of queries result that could be a bug in CF11.  The result is fine in CF10.

       

      Basically, I have 2 queries, qrA and qrB.  I do a join of the two in joinQr, after which I do a query of qrA.  Since I didn't alter qrA in any way, I would expect newQrA to give me the same result as qrA.  However it only gives me one row ("D").  Now, here's the strange thing:  If I start off qrA with the letters in ascending order ["A", "B", "C", "D"], then newQrA gives me the right result.

       

       

      <cfset qrA = queryNew("")>
      <cfset queryAddColumn( qrA, "size", "varchar", [ "D", "A", "B", "C" ] )>
      
      <cfset qrB = queryNew("")>
      <cfset queryAddColumn( qrB, "size", "varchar", [ "A" ] )>
      <cfset queryAddColumn( qrB, "quantity", "integer", [ 0 ] )>
      
      
      <cfquery name="joinQr" dbtype="query">
          select qrA.*, qrB.quantity
          from qrA, qrB
          where qrA.size = qrB.size
      </cfquery>
      
      <cfquery name="newQrA" dbtype="query">
          select *
          from qrA
      </cfquery>
      
      
      <cfdump var="#qrA#">
      <cfdump var="#qrB#">
      <cfdump var="#joinQr#">
      <cfdump var="#newQrA#">