问题标签 [ora-00907]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
333 浏览

oracle - 你好吗 ORA - 00907:缺少右括号

为什么我在hire_date 行上总是ORA 00907缺少右括号?

0 投票
2 回答
2038 浏览

oracle - ORA-00907 从我的 Java 应用程序查询但在 SQL Developer 中工作正常

我放入准备好的语句的查询是:

当我在我的应用程序中运行查询时,我得到:

java.sql.SQLSyntaxErrorException: ORA-00907: 缺少右括号

编辑:这是执行查询的java。我正在尝试返回一组搜索结果,因此前缀包含 SELECT 语句,然后我可以有任意数量的后缀(在此摘录“AUDIT_LOG_SEARCH2”中),它们是基于用户搜索的参数化 WHERE 子句:

但是当我在 SQL Developer 中单独运行时,查询运行良好。该查询最初是为 Postgres 创建的,然后为 Oracle 更新。有小费吗?

0 投票
1 回答
1706 浏览

sql - 错误 - ORA-00907: 缺少右括号

我是 SQL 新手,当我尝试运行查询时出现错误“错误 - ORA-00907:缺少右括号”,请帮我解决这个问题,请在下面找到查询提前致谢!

编辑1:添加代码标签!

0 投票
1 回答
831 浏览

compiler-errors - oracle ORA-00907 缺少括号错误

我想使用以下输入参数执行此过程。

我收到以下错误:

请让我知道我在哪里缺少括号。

0 投票
2 回答
3080 浏览

oracle - 使用 if else 阻止丢失右括号错误

我是新手,Oracle并且对MS SQL. 我正在尝试根据user_idfrom获取电话号码Table2,这是业务逻辑:

  • 案例1:如果找到一个匹配项,Table1则从中获取相应的免费电话号码Table2

  • 案例2:如果未找到匹配项,Table1则从以下获取默认免费电话号码Table2

  • 案例3:如果找到多个匹配项,Table1则所有这些都从order by or中assigned_care_levels获取Care值,然后选择第一行电话号码。Table2ascdesc

我编写了以下查询,当我单独运行它时效果很好。但是,当我使用 if else 语句结合它时,我收到以下错误ERROR: ORA-00907: missing right parenthesis。这是我的代码:

0 投票
4 回答
304396 浏览

sql - ORA-00907: 缺少右括号

过去两天我一直在查看这段代码,但我似乎无法让它工作。它不断地给我

ORA-00907: missing right parenthesis.

我知道这是一个经常出现的话题,但由于某种原因,我所看到的例子都没有帮助我。有人可以告诉我为什么会出现此错误以及如何解决吗?我很确定这与我的括号无关,也许是我的约束?

以下是我运行代码时得到的结果:

0 投票
1 回答
391 浏览

sql - ORACLE ORA00907: Differences in connection string using OraOLEDB.Oracle vs TNS lookup via Oracle in OraClient10g_home3

I am using Oracle Client 10.2g and by changing my connection string to the Oracle database I now get error ORA00907 for some of my queries.

The code is executing within excel 2010 using VBA and I can run 20+ quires without error using the following connection string:

By changing the connection string only to:

2 of the 20+ queries fail with ORA-00907: missing right parenthesis

One of the Queries that fails (refracted):

I have tested that the Query runs correctly in Oracle SQL Developer. I have verified that prior to Executing the query the SQL statements are identical for both connection strings.

The other query that fails is also using a union and rank function but it is not the only one.

The reason I wish to use the OraOLEDB.Oracle connection is that I am attempting to remove my reliance on the tnsnames.ora files as from time to time I add new database instances and want to avoid all my users having to update this file in the oracle directory.

Lastly the ORACLE database is version 8.

Any help would be greatly appreciated,

Thanks in advance!

Updated: Removed typo error

0 投票
1 回答
633 浏览

oracle - Oracle sql - ORA-00907 和我不正确的语法

我无法弄清楚以下代码的语法问题。当我运行它时,我得到了错误

ORA-00907: 缺少右括号

谁能指出我的缺点?

这是 的表定义application_history。理想情况下,我只想查看带有最新时间戳的应用程序编号。

0 投票
2 回答
610 浏览

oracle - ORA-00907: 在 Oracle 11G 中创建表时缺少右括号

ORA-00907: missing right parenthesis在 Oracle 11G 中,创建下表时收到错误消息

我列出了整个表格,因为有时错误行会发生变化 - 显示了第 6 行和第 9 行。据我所知,所有括号都是可见的。在 shell 和 APEX 中都会出现此问题。

0 投票
1 回答
74 浏览

sql - Oracle - 带有嵌套查询的用例

我有这样的 oracle 语法:

但它发送错误消息ORA-00907: missing right parenthesis, ,它指的是“order by je desc”。
那么,我该怎么做才能没有错误?