create or replace trigger trigger_fbi_buzi_9008_update
after INSERT OR UPDATE ON fbi_buzi_9008
FOR EACH ROW
declare
begin
if (:new.result_code = '000000' and :new.buzi_type = '005' and :new.packet_code = '1003' ) then----授权支付 已到账
update jdcztest.CP_PLAN_AGENT_BILL t set t.a_status_code = '6'
where v_cp_plan_agnet_list.DP_DETAIL_ID = :new.buzi_id ;
END IF;
END trigger_fbi_buzi_9008_update;这是我的触发器代码,现在报PL/SQL:ora-00904:“v_cp_plan_agnet_list.DP_DETAIL_ID”:invalid identifier
sql statement ignored
我的视图是写好了的,现在触发器没法编译通过
after INSERT OR UPDATE ON fbi_buzi_9008
FOR EACH ROW
declare
begin
if (:new.result_code = '000000' and :new.buzi_type = '005' and :new.packet_code = '1003' ) then----授权支付 已到账
update jdcztest.CP_PLAN_AGENT_BILL t set t.a_status_code = '6'
where v_cp_plan_agnet_list.DP_DETAIL_ID = :new.buzi_id ;
END IF;
END trigger_fbi_buzi_9008_update;这是我的触发器代码,现在报PL/SQL:ora-00904:“v_cp_plan_agnet_list.DP_DETAIL_ID”:invalid identifier
sql statement ignored
我的视图是写好了的,现在触发器没法编译通过
解决方案 »
- 关闭数据库 提示using target database controlfile instead of recovery catalog
- 看书时遇到的一个问题!
- 求sql 语句
- 大家帮忙,Oracel启动怎么和IIS有冲突,Httpserver启动就报java.exe应用程序错误,内存xxxxxxx不能为只读
- 如何将EXCEL表中的数据导到ORALCE数据库中,请教!谢谢
- 求教:在触发器里操作LOB字段
- 在线等待!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- 存储过程的调试?
- 表空间与数据文件是一个什么样的关系?
- ora--00314 日志n要求的序号XX与XX不匹配
- oracle-schema
- 请教一个关于 11g r2 emca的问题
create or replace trigger trigger_fbi_buzi_9008_update
after INSERT OR UPDATE ON fbi_buzi_9008
FOR EACH ROW
--declare--去掉
begin
if (:new.result_code = '000000' and :new.buzi_type = '005' and :new.packet_code = '1003' ) then----授权支付 已到账
update jdcztest.CP_PLAN_AGENT_BILL t set t.a_status_code = '6'
where v_cp_plan_agnet_list.DP_DETAIL_ID = :new.buzi_id ;
END IF;
END trigger_fbi_buzi_9008_update;
-- where v_cp_plan_agnet_list.DP_DETAIL_ID = :new.buzi_id ;
这句话是什么意思呢?
你更新CP_PLAN_AGENT_BILL 表,where的条件却是v_cp_plan_agnet_list表?
也没有两个表做联合,就会报错。
where v_cp_plan_agnet_list.DP_DETAIL_ID = :new.buzi_id ;--你的where倏件應該同一個表的字段,怎么搞了另一個表,這個地方應也不對
--declare--去掉NO..... DECLARE 要存在而且必须存在.