我正面临以下问题。我在Oracle 11g第2版中创建了一个包含以下sql的表:
CREATE OR REPLACE TRIGGER location_audit
AFTER UPDATE OF city
ON hr.locations
REFERENCING NEW AS NEW OLD AS OLD
FOR EACH ROW
BEGIN
IF :old.city != :new.city THEN
INSERT INTO loc_aud
VALUES (user, sysdate, UTL_INADDR.get_host_address,
:new.location_id,:old.city,:new.city);
END IF;
END;
此表位于sys架构中。然后,我使用sys schema
中的以下命令为值基础审计创建了一个触发器city
之后我连接了hr模式并尝试使用以下命令更新update locations set city = 'Dhaka' where location_id = 2100;
列:
update locations set city = 'Dubai' where location_id = 2100
*
ERROR at line 1:
ORA-01722: invalid number
ORA-06512: at "SYS.LOCATION_AUDIT", line 3
ORA-04088: error during execution of trigger 'SYS.LOCATION_AUDIT'
但是它给了我以下错误
// Initialize OngeSignal with Settings for Push Notifications
OneSignal.initWithLaunchOptions(launchOptions, appId: Constants.OneSignalAppID, handleNotificationReceived: nil, handleNotificationAction: {
(result) in
// Do Something with Notification Result
}, settings: [kOSSettingsKeyInFocusDisplayOption : OSNotificationDisplayType.none.rawValue])
我做错了什么?
答案 0 :(得分:0)
我创建的名为loc_aud
的表具有错误的数据类型。列city
为varchar2
,我尝试保存的是number
数据类型。我改变了桌面并且它有效。