| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 867 人关注过本帖
标题:一个存储过程的编译错误,急呀..各位大虾帮忙呀?
只看楼主 加入收藏
yiranmuder
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-8-19
收藏
 问题点数:0 回复次数:1 
一个存储过程的编译错误,急呀..各位大虾帮忙呀?
CREATE OR REPLACE PROCEDURE test(inv_id in NUMBER,storehouse_id in NUMBER,tag in varchar2) AS
   BEGIN
   BEGIN
       IF tag='国家基本药品'
       then  
       DECLARE CURSOR cursorA IS select distinct(a.m_id) from store a,medicine b where a.storehouse_id=storehouse_id and  a.m_id= b.m_id and b.basic_tag='是' and b.special_tag_id='3';
       END IF;
       IF tag ='非国家基本药品'
       then  
       DECLARE CURSOR cursorA IS select distinct(a.m_id) from store a,medicine b where a.storehouse_id=storehouse_id and  a.m_id= b.m_id and b.basic_tag='否' and b.special_tag_id='3';
       END IF;
       IF tag='消耗材料'
       then  
       DECLARE CURSOR cursorA IS select distinct(a.m_id) from store a,medicine b where a.storehouse_id=storehouse_id and  a.m_id= b.m_id  and b.special_tag_id='21';
       END IF;
       IF tag='特殊药品'
       then  
       DECLARE CURSOR cursorA IS select distinct(a.m_id) from store a,medicine b where a.storehouse_id=storehouse_id and  a.m_id= b.m_id  and b.special_tag_id not in('3','21');
       END IF;     
     END;
     END;



错误提示: 第八行pls-001103出现'end'需要在下列情况之一......
搜索更多相关主题的帖子: 编译 
2010-08-19 18:41
yiranmuder
Rank: 1
等 级:新手上路
帖 子:2
专家分:0
注 册:2010-8-19
收藏
得分:0 
自己先顶一个

可否通过传入参数控制存储过程变量的定义呀?
有什么方法呀?
2010-08-20 08:27
快速回复:一个存储过程的编译错误,急呀..各位大虾帮忙呀?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014068 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved