- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我需要在数据库中添加新记录,或者如果已经存在则对其进行更新。
我使用了IF else子句。
我对我的oracle数据库有一个SQL查询,如下所示:
DECLARE EXISTS number;
BEGIN
SELECT count(*) INTO EXISTS
FROM reports
WHERE report_id=27;
IF(EXISTS =0) THEN
INSERT INTO reports (REPORT_ID,TITLE,CATEGORY,DISPLAY_ORDER,QUERY,DESCRIPTION,CONTENT_SEQ,DELD,ADMIN_ID,DATE_UPD)
VALUES (27,
'Check user entered keywords have valid resource link',
'zData checks',
9120,
'Select Rk.Resource_Id As "Resource IDs", Rp.Display_Title As "Title", St.Title As "Type",
Decode(Rp.Deld, Null, ''Missing resource'',''Resource deleted (DELD is '' || Rp.Deld || '')'') As "Reason",
rk.keyword,L.Email As "Owner" from resource_keywords rk
Left Join Resources Rp On rk.Resource_Id = Rp.Resource_Id
Left Join Special_Types St On Rp.Special_Id = St.Special_Id
Left Join Login L On rk.Admin_Id = L.Login_Id
Where Rk.Deld = 0 And (Rp.Resource_Id Is Null Or Rp.Deld Is Null Or Rp.Deld <> 0);',
'Check resource_keywords entries for valid and not deleted resource_id.',
1,
0,
1,
CURRENT_TIMESTAMP);
ELSE
UPDATE reports
SET TITLE = 'Check user entered keywords have valid resource link',
CATEGORY = 'zData checks',
DISPLAY_ORDER= 9120,
QUERY ='Select Rk.Resource_Id As "Resource IDs", Rp.Display_Title As "Title", St.Title As "Type",
Decode(Rp.Deld, Null, ''Missing resource'',''Resource deleted (DELD is '' || Rp.Deld || '')'') As "Reason",
rk.keyword,L.Email As "Owner" from resource_keywords rk
Left Join Resources Rp On rk.Resource_Id = Rp.Resource_Id
Left Join Special_Types St On Rp.Special_Id = St.Special_Id
Left Join Login L On rk.Admin_Id = L.Login_Id
Where Rk.Deld = 0 And (Rp.Resource_Id Is Null Or Rp.Deld Is Null Or Rp.Deld <> 0);',
DESCRIPTION='Check resource_keywords entries for valid and not deleted resource_id.',
CONTENT_SEQ=1,
DELD=0,
ADMIN_ID=1,
DATE_UPD = CURRENT_TIMESTAMP
WHERE REPORT_ID = 27;
END IF;
END;
Error report:
ORA-06550: line 3, column 22:
PL/SQL: ORA-00936: missing expression
ORA-06550: line 3, column 1:
PL/SQL: SQL Statement ignored
ORA-06550: line 7, column 11:
PLS-00103: Encountered the symbol "=" when expecting one of the following:
(
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
最佳答案
ORA-06550: line 3, column 22: PL/SQL: ORA-00936: missing expression
SELECT count(*) INTO EXISTS
。
第22列将带您到
EXISTS
。这是一个保留关键字,因此您不能直接使用它。
SQL> DECLARE
2 "EXISTS" NUMBER;
3 BEGIN
4 SELECT COUNT(*) INTO "EXISTS" FROM emp;
5 dbms_output.put_line("EXISTS");
6 END;
7 /
14
PL/SQL procedure successfully completed.
SQL>
关于oracle - PL/SQL : ORA-00936: missing expression::Where Am I going wrong in the code?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28956824/
要在标题(或谷歌)中简洁地描述这是一个棘手的问题。我有一个分类表,其中某些列可能会根据置信度列为“已删除”。我想用“未识别”替换任何显示“已删除”的列,后跟第一列中未识别的值以行方式说“掉落”。因此,
我在 VSCode 上使用 pygame 模块,但遇到了 pygame 没有 init 成员的问题。我遵循了 this 的解决方案关联。我编辑了用户设置并添加了 "python.linting
我的问题是如何解决丢失的脚本太旧或丢失!! checking for a BSD-compatible install... /usr/bin/install -c checking whether
我正在使用带有启动器的 Spring Boot。当我错误配置启动器(缺少或定义了错误的值)时,它会打印“缺少 bean”错误消息,而不是“缺少值”。很难找到这个错误。 我的开胃菜看起来像 @Condi
我在 Django 1.7 中遇到问题,我正在尝试将用户保存到表中,但我收到一个错误,指出该表不存在。 这是我正在执行的代码: from django.conf import settings fro
我正在查看 EhCache 统计数据,我看到了这些数字: CacheMisses: 75977 CacheHits: 38151 InMemoryCacheMisses: 4843 InMemoryC
我正在尝试使用这些数据运行 lme 模型: tot_nochc=runif(10,1,15) cor_partner=factor(c(1,1,0,1,0,0,0,0,1,0)) age=runif(
我在 Microsoft Visual Studio C++ 中编写了一个程序,并为此使用了 SFML。我包含了程序所需的正确的 .dll 文件,并将它们复制到“发布”文件夹中。有效。整个程序在我的电
在设置新的Reaction CSR应用程序、一些样板库等过程中。在控制台中收到以下错误:。现在,我不会去修复一些我没有维护的包。我怎么才能找到真正的问题呢?Vite dev Build没有报告错误。
我正在上 React Native 类(class),然后使用 Flow 尝试纠正类(class)中的错误,因为讲师没有使用任何类型检查。 我在 Flow 中遇到了另一个错误,通过在互联网上进行长时间
我想删除图像标签正在寻找的缺失错误。我不想要 ult 标签占位符,试图故意将其保留为空白,直到我使用回形针浏览上传照片。 我已经将 url(:missing) 更改为许多其他内容,例如 nil 等。是
CREATE TABLE customer(customer_id NUMBER(6) PRIMARY KEY , customer_name VARCHAR2(40) NOT NULL , cust
我正在设置 invisible reCAPTCHA在我的 Web 应用程序中并且无法验证用户的响应。 (即使我传递了正确的 POST 参数) 我通过调用 grecaptcha.execute(); 以
我搜索了 these SO results找不到与我的问题相关的任何内容。我怀疑这可能是重复的。 我目前正在 .NET C# 3.5 中编写 Microsoft.Office.Interop.Exce
我在同一行收到两个错误。 Bridge *在 Lan 类中排名第一。我错过了什么? #include #include #include using namespace std; class L
首先,我看到了一些解决方案,但我没有理解它们。我是 QT 的新手,甚至谷歌也没有帮助我。英语不是我的母语 这是在QT Creator 5.6中调试后的报错信息 C2143: syntax error:
有没有办法把表1展开成表2?就是将start_no和end_no之间的每一个整数作为seq_no字段输出,取原表的其他字段组成新表(表2)。 表 1: date source market
我在 Excel (2016) 中制作了一个旭日形图,并希望为所有数据点添加标签。问题是,Excel 会自动丢弃一些标签: 似乎标签被删除是因为数据点太小或标签字符串太长。如何让 Excel 显示所有
在 R 3.0.2 中,missing() 函数可以告诉我们是否缺少形式参数。 如何避免硬编码传递给丢失的变量名称?例如在 demoargs <- function(a=3, b=2, d) {
我试图在 UI 上的某些功能中返回一个按钮,但出现了一个奇怪的错误。有人可以帮忙吗? var div = "View" 我得到的错误是: 参数列表后缺少 )。 最佳答案 onclick="javas
我是一名优秀的程序员,十分优秀!