问题描述
当我插入新项目时它正在工作
但当我更新项目时它不起作用
可以帮助我吗?
如果I_FBP_CHANGED ='C'且I_INITIAL_CUST_LOAD不为空那么
插入ABC
(restortn_step_id,evnt_id ,cust_acc_no,house_no,street_name,cust_name
,MODIFED_TIMESTAMP,MODIFED_BY)
(选择I_STEP_ID作为step_id,
I_EVNT as evnt_id,a.acc_no,a.house_no,a.street_name
,a.cust_name
,sysdate,MODIFIED_BY来自ABC a
其中a.restortn_step_id = I_INITIAL_CUST_LOAD);
i需要使用此查询更新项目如何?
when i am inserting new item its working
but when im updating item its not working
can any one help me?
IF I_FBP_CHANGED = 'C' AND I_INITIAL_CUST_LOAD IS NOT NULL THEN
insert into ABC
(restortn_step_id, evnt_id ,cust_acc_no ,house_no ,street_name ,cust_name
, MODIFED_TIMESTAMP,MODIFED_BY )
(select I_STEP_ID as step_id ,
I_EVNT as evnt_id, a.acc_no,a.house_no, a.street_name
,a.cust_name
, sysdate , MODIFIED_BY from ABC a
where a.restortn_step_id = I_INITIAL_CUST_LOAD);
i need to update item using this query how?
推荐答案
UPDATE ABC
SET restortn_step_id = a.restortn_step_id,evnt_id = a.evnt_id --...
from ABC a
where a.restortn_step_id = I_INITIAL_CUST_LOAD
这篇关于如何使用此查询更新项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!