September 24, 2021
Ordinals no longer support in query of query
Comments
(5)
September 24, 2021
Ordinals no longer support in query of query
Newbie 5 posts
Followers: 2 people
(5)

Migrating from Cf2016 to CF2018 I discovered that CFQUERY of query results no longer support using ordinals in the order by clause.  For example,

<cfquery name=”getroles” dbtype=”query”>
select distinct role, role_action, sort_order
from approvers
order by 3
</cfquery>

would sort the selection by the field sort_order up to and including CF2016.  This has to be rewritten to work in CF2018 as

<cfquery name=”getroles” dbtype=”query”>
select distinct role, role_action, sort_order
from approvers
order by sort_order
</cfquery>

I was unable to  find any reference to this searching the web.  Hope it helps someone.

5 Comments
2021-09-27 20:11:33
2021-09-27 20:11:33

Use of an integer sort column in Query of Query was working fine until CF 2018 Update 12 broke it.  A Hot Fix is available that restores the previous behavior.

Like
2021-09-27 16:40:26
2021-09-27 16:40:26

I think we have fixed this issue as well. Can you please send an email to me at priyasha@adobe.com   and I will share the updated patch with you.

 

Like
(2)
>
Priyank Shrivastava
's comment
2021-09-27 16:57:49
2021-09-27 16:57:49
>
Priyank Shrivastava
's comment

So Priyank, are you saying that this problem is one as of update 12 of CF2018? and so fixed by that special update to update 12 (for query of queries issues)?

If so, then readers should note that this means this ordinal value WOULD have worked for folks who had NOT YET APPLIED update 12 of CF2018.

(And also, if I am reading Priyank right, then this would ALSO be a problem that would hit folks in CF2021 who applied update 2, which also introduced new bugs in query of queries, that are fixed by a special hotfix available for BOTH CF2018 and 2021, after these two updates of earlier this month.)

Like
>
Charlie Arehart
's comment
2021-09-27 16:59:58
2021-09-27 16:59:58
>
Charlie Arehart
's comment

Yes, I think we have fixed it and I want user to try the updated fix. If that will not fix it, I will check with development team.

Like
2021-09-27 15:45:00
2021-09-27 15:45:00

[comment deleted, based on clarification from Priyank] 

Like
Add Comment