我需要执行一个 if else 结构的事务块,但是在 ‘执行sql脚本‘控件一直执行不成功,如下语句
declare tempCount int;
begin
select count(*) into tempCount from MasterIndex where DATAINDEX='?';
if tempCount>0 then
update MasterIndex set JCGWINDEX='?',MODIFYTIME=sysdate where IDCARDNO='?' and NAME='?';
else
insert into MasterIndex (DATAINDEX,IDCARDNO,NAME,JCGWINDEX,MODIFYTIME) values ('?','?','?','?',sysdate);
end if;
commit;
end;
