我在linux下用sqlplus执行test.sql不知道为什么不成功,test.sql内容如下:
declare
cou_num number;
reg_num varchar2(10);
val_num varchar2(10);
begin
select count(*) into cou_num from eax_mode_user where userid=19881988;
select agentid_reg into reg_num from eax_user where userid=19881988;
select value into val_num from system_cfg where lower(name)='agentid';
if(cou_num>0 and reg_num=val_num) then
delete from eax_mode_user where userid=19881988 and topid=(select max(topid) from eax_mode_user where userid=19881988);
commit;
end if;
end;
但是我在windows下用PL/SQL Developer执行却能成功,求大牛解答,谢谢
declare
cou_num number;
reg_num varchar2(10);
val_num varchar2(10);
begin
select count(*) into cou_num from eax_mode_user where userid=19881988;
select agentid_reg into reg_num from eax_user where userid=19881988;
select value into val_num from system_cfg where lower(name)='agentid';
if(cou_num>0 and reg_num=val_num) then
delete from eax_mode_user where userid=19881988 and topid=(select max(topid) from eax_mode_user where userid=19881988);
commit;
end if;
end;
但是我在windows下用PL/SQL Developer执行却能成功,求大牛解答,谢谢
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - ProductionSQL> 2 3 4 5 6 7 8 9 10 Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
/