我正在编写一个基本的插入脚本,并在开始时尝试删除我稍后插入的内容,以便脚本可以多次运行。下面是代码的一小部分。我收到错误,如:“无效的主机/绑定变量名称”和“绑定变量”SELECTIONS“未声明。”
例如:
SET DEFINE OFF
DELETE FROM SELECTIONS WHERE DATAFIELD IN ('ba', 'bb', 'bc', 'bd');
DELETE FROM SELECTION_LOCALE WHERE DATAFIELD IN ('ba', 'bb', 'bc', 'bd');
COMMIT;
INSERT INTO SELECTIONS (SELECTIONS_ID, DATAFIELD, DESCRIPTION) VALUES ('CATCHANGE', 'ba', 'PI&D Library');
INSERT INTO SELECTIONS (SELECTIONS_ID, DATAFIELD, DESCRIPTION) VALUES ('CATCHANGE', 'bb', 'Non-conformance');
INSERT INTO SELECTIONS (SELECTIONS_ID, DATAFIELD, DESCRIPTION) VALUES ('CATCHANGE', 'bc', 'Alternative Route');
COMMIT;
有什么想法吗?
答案 0 :(得分:0)
它认为PI& D是绑定变量。但通常SET DEFINE OFF修复了这个问题。尝试在SET DEFINE OFF后添加分号