oracle 如何解决 ORA 00936 Missing Expression 错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12156399/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to resolve ORA 00936 Missing Expression Error?
提问by user1466466
Select /*+USE_HASH( a b ) */ to_char(date, 'MM/DD/YYYY HH24:MI:SS') as LABEL,
ltrim(rtrim(substr(oled, 9, 16))) as VALUE,
from rrfh a, rrf b,
where ltrim(rtrim(substr(oled, 1, 9))) = 'stata kish'
and a.xyz = b.xyz
The "from " (3rd line) part of the above query is giving me ORA-00936 Missing EXPRESSION error
. Please Help me
上述查询的“来自”(第 3 行)部分给了我ORA-00936 Missing EXPRESSION error
. 请帮我
NOTE:: rrfh table contains no data.
注意:: rrfh 表不包含数据。
回答by Adriaan Stander
Remove the comma?
去掉逗号?
select /*+USE_HASH( a b ) */ to_char(date, 'MM/DD/YYYY HH24:MI:SS') as LABEL,
ltrim(rtrim(substr(oled, 9, 16))) as VALUE
from rrfh a, rrf b
where ltrim(rtrim(substr(oled, 1, 9))) = 'stata kish'
and a.xyz = b.xyz
Have a look at FROM
看看从
SELECTING from multiple tables You can include multiple tables in the FROM clause by listing the tables with a comma in between each table name
从多个表中选择您可以通过在每个表名之间用逗号列出表来在 FROM 子句中包含多个表
回答by Kishor m n
This answer is not the answer for the above mentioned question but it is related to same topic and might be useful for people searching for same error.
这个答案不是上述问题的答案,但它与同一主题有关,可能对搜索相同错误的人有用。
I faced the same error when I executed below mentioned query.
当我执行下面提到的查询时,我遇到了同样的错误。
select OR.* from ORDER_REL_STAT OR
select OR.* from ORDER_REL_STAT OR
problem with above query was ORis keyword so it was expecting other values when I replaced with some other alias it worked fine.
上面查询的问题是OR是关键字,所以当我用其他一些别名替换它时,它期待其他值,它工作正常。
回答by csandreas1
This happens every time you insert/ update and you don't use single quotes. When the variable is empty it will result in that error. Fix it by using ''
每次插入/更新时都会发生这种情况,并且不使用单引号。当变量为空时,将导致该错误。使用修复它''
Assuming the first parameter is an empty variable here is a simple example:
假设第一个参数是一个空变量,这里是一个简单的例子:
Wrong
错误的
nvl( ,0)
nvl( ,0)
Fix
使固定
nvl('' ,0)
nvl('' ,0)
Put your query into your database software and check it for that error. Generally this is an easy fix
将您的查询放入您的数据库软件并检查该错误。通常这是一个简单的修复
回答by user2412576
update INC.PROV_CSP_DEMO_ADDR_TEMP pd
set pd.practice_name = (
select PRSQ_COMMENT FROM INC.CMC_PRSQ_SITE_QA PRSQ
WHERE PRSQ.PRSQ_MCTR_ITEM = 'PRNM'
AND PRSQ.PRAD_ID = pd.provider_id
AND PRSQ.PRAD_TYPE = pd.prov_addr_type
AND ROWNUM = 1
)
回答by Cornelius Muthiani
Remove the coma at the end of your SELECT statement (VALUE,), and also remove the one at the end of your FROM statement (rrf b,)
删除 SELECT 语句 (VALUE,) 末尾的昏迷,并删除 FROM 语句末尾的昏迷 (rrf b,)