Skip to main content
Inspiring
October 6, 2021
Answered

query of query order by column index giving error in CF 2021.

  • October 6, 2021
  • 1 reply
  • 723 views

I am getting error when I am using column index inside the Query of Query SQL. This is happening on Coldfusion 2021 and seems fine w/ Coldfusion 2016. Is this bug w/ Coldfusion 2021? THANKS!

<cffunction name="test" access="public">
    <cfquery datasource="myDS" name="local.getData" >
        SELECT email, first_name, last_name
        FROM users
    </cfquery>
    <cfquery dbtype="query" name="local.testQrySet">
        select email, first_name, last_name 
        from getData 
        where id=<cfqueryparam value="1919" cfsqltype="cf_sql_numeric" />
        order by 2 asc
    </cfquery>
    <cfdump var="#local.testQrySet#" />
</cffunction>

<cfset test() />

 

    This topic has been closed for replies.
    Correct answer RaviShankar Chagnur

    Hello Joseph,

     

    There is a fix available for this issue, please send an Email to cfsup@adobe.com for the fix

     

    Thanks & Regards

    Ravi

     

     

     

    1 reply

    RaviShankar Chagnur
    Adobe Employee
    RaviShankar ChagnurCorrect answer
    Adobe Employee
    October 6, 2021

    Hello Joseph,

     

    There is a fix available for this issue, please send an Email to cfsup@adobe.com for the fix

     

    Thanks & Regards

    Ravi

     

     

     

    Inspiring
    October 6, 2021

    Allright. Thank you so much Ravi.