gpt4 book ai didi

coldfusion - update12 Coldfusion 2018 后按顺序返回重复列的查询(QoQ)查询

转载 作者:行者123 更新时间:2023-12-04 12:21:10 25 4
gpt4 key购买 nike

我已经用最新的 更新了我的 Coldfusion 2018 服务器更新 12 由 Adob​​e。一旦我更新了服务器,我就用 为我的应用程序写了一些 QoQ |按我的 QoQ 订购 .每当我在 QoQ 中使用 order by 时,结果数据都会有一些重复的列。

For my simple sample query as example, 

<cfquery name="testRead" datasource="testmssql">
SELECT * FROM loginDetails
</cfquery>

<cfdump var="#testRead#" label="Main Query">

<cfquery name='readSub' dbtype="query">
SELECT userID, Username FROM testRead
ORDER BY userid DESC
</cfquery>

<cfdump var="#readSub#" label="QoQ Result" abort="true">

**Output:** Refer my image please.
enter image description here
在这里您可以看到第二个 QoQ 转储有两个 userID 列。我不确定为什么我们在这里拥有它以及它来自哪里。 ?如果我在 ORDER BY 列表中再添加一列,那么该列也会在结果查询中重复。例如,如果添加 ORDER BY userid DESC, userName 那么查询转储查询具有 userID,userid,userName,username。
注意:在我的更新 12 之前它不会发生。它不会发生在主查询中。
Any thoughts ? Please share. Thank you advance !.

最佳答案

这是更新的一个已知问题,并且已向 Adob​​e 提交了一个错误。我建议您添加评论并为该错误投票。
Adobe Bug Tracker - CF-4212383
在包含 ORDER BY 子句的查询查询中具有相同名称的重复列。
该错误的描述:

Problem Description:

After applying CF 2021 Update 2, when using an ORDER BY clause in a QoQ, the fields in the ORDER BY clause have become case sensitive, and if they don't match exactly the case of the fields in the SELECT list, then a duplicate column is added to the resultant query, resulting in a query that has two (or more) columns with the same name.

Further, if no fields are added to the SELECT list and * is used instead, the fields in the ORDER BY clause must be upper case, otherwise duplicate columns with the same name (but different case) again appear in the resultant query.

This showstopping behaviour has been introduced in CF 2021 Update 2. CF2021 Update 1 behaves as expected. (CF2016 also behaves as expected).


即使该错误提到了 CF 2021 更新 2,它也会影响 CF 2018 更新 12。经 bug CF-4212430 验证提交用于 CF 2018 更新 12,该更新已作为 CF 2021 错误的副本关闭。

关于coldfusion - update12 Coldfusion 2018 后按顺序返回重复列的查询(QoQ)查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69407840/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com