- 论坛徽章:
- 0
|
这段代码编译时在load处显示语法错误
create procedure addphonenum()
returning int;
define newphonenum char( ;
define locationid char(3);
define SQL_error,ISAM_error int;
define error_data varchar(255);
begin
on exception set SQL_error,ISAM_error,error_data
return 1;
end exception with resume
end
--set debug file to
--trace on
create temp table tempnumtabmob
(phonenum char( not null,
locationid char(3) not null);
load from newphonenum
insert into tempnumtabmob;
foreach select phonenum,locationid into newphonenum,locationid
from tempnumtabmob
if
exists(select phonenum from iip_numtabmob where phonenum=newphonenum)
then continue foreach;
else insert into iip_numtabmob values(newphonenum,locationid);
end if
end foreach;
drop table tempnumtabmob;
return 0;
end procedure;
是不是存储过程里不能用load这个函数?在线等 |
|