//增加一菜单时
insert into hsi_menu (C_SYSNAME, L_MENUTYPE, C_PARENTCODE, C_MENUCODE, C_MENUNAME, C_DESCRIBE, L_SHORTCUT, L_FUNCTIONTYPE, C_DLLFILE, C_DLLFUNCTION, L_FUNCTIONID, C_COMMAND, C_ICONFILENAME, L_OUTLOOK, L_ORD, C_RIGHTCODE, C_RIGHTCODE2, C_LEAF, C_ISUSE, C_VERSIONTYPE, C_AUTHCODE)
values ('FUNDCRM', 1, ' 092304', ' 09230406', '额度分配监控', null, null, 2, 'sale', 'SaleProjectActionTransfer.jsp?svcrightflag=MONITOR&latitude=quota', 0, null, null, 1, 4, null, null, '1', '1', 'trust', null);
commit;
--.oracle中&符是用来定义临时变量的,所以要在oracle中使用&符需要对这个符号进行转义(ASCII编码)
解决方法
1.在执行语句前加set define off;(意思是去掉oracle自定义的字符含义,还原它本来的意思)
set define off;
delete from hsi_menu h where h.c_sysname = 'FUNDCRM' and h.c_menucode = ' 09230406';
insert into hsi_menu (C_SYSNAME, L_MENUTYPE, C_PARENTCODE, C_MENUCODE, C_MENUNAME, C_DESCRIBE, L_SHORTCUT, L_FUNCTIONTYPE, C_DLLFILE, C_DLLFUNCTION, L_FUNCTIONID, C_COMMAND, C_ICONFILENAME, L_OUTLOOK, L_ORD, C_RIGHTCODE, C_RIGHTCODE2, C_LEAF, C_ISUSE, C_VERSIONTYPE, C_AUTHCODE)
values ('FUNDCRM', 1, ' 092304', ' 09230406', '额度分配监控', null, null, 2, 'sale', 'SaleProjectActionTransfer.jsp?svcrightflag=MONITOR&latitude=quota', 0, null, null, 1, 4, null, null, '1', '1', 'trust', null);
commit;
2.用(ASCII编码)对&进行转义chr(38)
insert into hsi_menu (C_SYSNAME, L_MENUTYPE, C_PARENTCODE, C_MENUCODE, C_MENUNAME, C_DESCRIBE, L_SHORTCUT, L_FUNCTIONTYPE, C_DLLFILE, C_DLLFUNCTION, L_FUNCTIONID, C_COMMAND, C_ICONFILENAME, L_OUTLOOK, L_ORD, C_RIGHTCODE, C_RIGHTCODE2, C_LEAF, C_ISUSE, C_VERSIONTYPE, C_AUTHCODE)
values ('FUNDCRM', 1, ' 092304', ' 09230406', '额度分配监控', null, null, 2, 'sale', 'SaleProjectActionTransfer.jsp?svcrightflag=MONITOR'||chr(38)||'latitude=quota', 0, null, null, 1, 4, null, null, '1', '1', 'trust', null);
commit;
3.不转义,直接字符串的形式写进去。
insert into hsi_menu (C_SYSNAME, L_MENUTYPE, C_PARENTCODE, C_MENUCODE, C_MENUNAME, C_DESCRIBE, L_SHORTCUT, L_FUNCTIONTYPE, C_DLLFILE, C_DLLFUNCTION, L_FUNCTIONID, C_COMMAND, C_ICONFILENAME, L_OUTLOOK, L_ORD, C_RIGHTCODE, C_RIGHTCODE2, C_LEAF, C_ISUSE, C_VERSIONTYPE, C_AUTHCODE)
values ('FUNDCRM', 1, ' 092304', ' 09230406', '额度分配监控', null, null, 2, 'sale', 'SaleProjectActionTransfer.jsp?svcrightflag=MONITOR'||'&'||'latitude=quota', 0, null, null, 1, 4, null, null, '1', '1', 'trust', null);
commit;