免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1750 | 回复: 2
打印 上一主题 下一主题

请教一个存储过程中可以load吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-05-24 10:11 |只看该作者 |倒序浏览
这段代码编译时在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这个函数?在线等

论坛徽章:
0
2 [报告]
发表于 2006-05-24 10:15 |只看该作者
是的,存储过程中不能用load,只有在dbaccess中使用,

论坛徽章:
0
3 [报告]
发表于 2006-05-24 10:19 |只看该作者
看来只有用shell去访问数据库再调用存储过程了

[ 本帖最后由 吸学蚊子 于 2006-5-24 10:21 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP