出现错误 ORA-00909: 参数数量无效 [英] Getting error ORA-00909: invalid number of arguments

查看:660
本文介绍了出现错误 ORA-00909: 参数数量无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CREATE VIEW ITCC.release_testcase_count 
AS 
(
SELECT CONCAT(rtm.requirement_id,'-',tct.release_id) AS id,
       rtm.requirement_id AS requirement_id,
       tct.release_id AS release_id, 
       COUNT(tct.release_id) AS testcase_count
from testcase_version tcv 
  INNER JOIN tcr_catalog_tree_testcase tct ON tcv.id = tct.testcase_version_id 
  LEFT JOIN requirement_testcase_mapping rtm ON rtm.testcase_id=tcv.testcase_id
GROUP BY tct.release_id , rtm.requirement_id
);

相同的查询适用于 ms sql 和 my sql,没有任何语法错误.我也想在 oracle 中执行它,但我遇到了同样的错误

same query is working for ms sql and my sql without any syntax error. i want to execute it in oracle as well but i am getting error for the same

推荐答案

Oracle CONCAT 函数只需要两个,而不是三个或更多参数.不使用 CONCAT,只需使用连接运算符:

The Oracle CONCAT function only takes two, not three or more, parameters. Instead of using CONCAT, just use the concatenation operator:

CREATE VIEW ITCC.release_testcase_count AS (
    SELECT rtm.requirement_id || '-' || tct.release_id AS id,
    ...
)

或者,如果您真的想在这里使用 CONCAT,那么您可以将它们链接在一起:

Or, if you really want to use CONCAT here, then you may chain them together:

CREATE VIEW ITCC.release_testcase_count AS (
    SELECT CONCAT(rtm.requirement_id, CONCAT('-', tct.release_id)) AS id,
    ...
)

这篇关于出现错误 ORA-00909: 参数数量无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆