Skip to main content
Inspiring
Oct 6, 2021 6:08 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
    RaviShankar Chagnur
    RaviShankar ChagnurCorrect answer
    Adobe Employee
    Oct 6, 2021 8:06 PM UTC

    Hello Joseph,

     

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

     

    Thanks & Regards

    Ravi

     

     

     

    2 replies

    RaviShankar Chagnur
    Adobe Employee
    RaviShankar ChagnurCorrect answer
    Adobe Employee
    Oct 6, 2021 8:06 PM UTC

    Hello Joseph,

     

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

     

    Thanks & Regards

    Ravi

     

     

     

    Translate
    Inspiring
    Oct 6, 2021 8:43 PM UTC

    Allright. Thank you so much Ravi.

    Translate