为什么我不能在 select 语句中使用 CTE?
Why can't I use a CTE in my select statement?
我有一个 Mule 应用程序 运行 一个运行良好的数据库查询(虽然有点慢)。它的详细信息是:
- Mule 3.7.2 EE
- Anypoint Studio 5.4.1
- jdk1.7.0_51
- 使用 oracle
ojdbc6
驱动程序
现在,当我使用 ojdbc6
驱动程序创建 database
连接时,不使用通用 Table 表达式 (CTE),查询运行良好(2.5 秒)。
当我使用我的 CTE 时,查询失败并出现错误:
org.mule.api.MessagingException
: Query type must be one of '[SELECT, STORE_PROCEDURE_CALL]' but was 'DDL' (java.lang.IllegalArgumentException
). Message payload is of type: NullPayload
很明显,在某些时候 Mule EE 服务器认为我正在尝试执行 DDL,而我并没有。
使用 CTE 的新查询在 SQL 开发人员中运行得非常好(0.250 秒),所以我知道这不是我的查询。
为什么我不能在 Mule 中使用 CTE (WITH
) 语句?
这是一个已知问题吗?我做错了什么吗?
CTE前查询(简化):
SELECT '1' AS COLUMN_ONE, 'X' AS COLUMN_X
FROM DUAL
CTE 后查询(简化):
WITH TBL AS
(
SELECT '1' AS COLUMN_ONE, 'X' AS COLUMN_X
FROM DUAL
)
SELECT * FROM TBL
截至 2016-04-27,Mule.
不支持 CTE 语句
我不得不深入挖掘这个。
- I tweeted this question and tagged @MuleSoft and @MuleDev
- 我得到的答复是:
if you haven't already we'd also suggest posting this in the forums - http://forums.mulesoft.com
- I then posted the issue on the Mulesoft Forums
- 无果
- 然后我使用 Mulesoft 记录了支持请求(案例编号 00107313)
- 我得到的答复是:
WITH is not currently supported by Mule ESB. Enhancement request(SE-987) has been raised but not implemented yet.
Engineering team work on JIRAs based on the priorities. If this JIRA is urgent to you, please provide the following information then I will escalate the JIRA for you
现在你可以解决这个写一个替代select语句的问题,如
Mule不支持CTE没有意义,很倒霉
我有一个 Mule 应用程序 运行 一个运行良好的数据库查询(虽然有点慢)。它的详细信息是:
- Mule 3.7.2 EE
- Anypoint Studio 5.4.1
- jdk1.7.0_51
- 使用 oracle
ojdbc6
驱动程序
现在,当我使用 ojdbc6
驱动程序创建 database
连接时,不使用通用 Table 表达式 (CTE),查询运行良好(2.5 秒)。
当我使用我的 CTE 时,查询失败并出现错误:
org.mule.api.MessagingException
: Query type must be one of '[SELECT, STORE_PROCEDURE_CALL]' but was 'DDL' (java.lang.IllegalArgumentException
). Message payload is of type: NullPayload
很明显,在某些时候 Mule EE 服务器认为我正在尝试执行 DDL,而我并没有。
使用 CTE 的新查询在 SQL 开发人员中运行得非常好(0.250 秒),所以我知道这不是我的查询。
为什么我不能在 Mule 中使用 CTE (WITH
) 语句?
这是一个已知问题吗?我做错了什么吗?
CTE前查询(简化):
SELECT '1' AS COLUMN_ONE, 'X' AS COLUMN_X
FROM DUAL
CTE 后查询(简化):
WITH TBL AS
(
SELECT '1' AS COLUMN_ONE, 'X' AS COLUMN_X
FROM DUAL
)
SELECT * FROM TBL
截至 2016-04-27,Mule.
不支持 CTE 语句我不得不深入挖掘这个。
- I tweeted this question and tagged @MuleSoft and @MuleDev
- 我得到的答复是:
if you haven't already we'd also suggest posting this in the forums - http://forums.mulesoft.com
- 我得到的答复是:
- I then posted the issue on the Mulesoft Forums
- 无果
- 然后我使用 Mulesoft 记录了支持请求(案例编号 00107313)
- 我得到的答复是:
WITH is not currently supported by Mule ESB. Enhancement request(SE-987) has been raised but not implemented yet.
Engineering team work on JIRAs based on the priorities. If this JIRA is urgent to you, please provide the following information then I will escalate the JIRA for you
- 我得到的答复是:
现在你可以解决这个写一个替代select语句的问题,如
Mule不支持CTE没有意义,很倒霉