ITPUB??ì3
12月微软Hyper-V虚拟化沙龙主题征集
ITPUB论坛 » Oracle开发 » 过程问题

标题: 过程问题
离线 Arraywujin
初级会员



精华贴数 0
个人空间 0
技术积分 80 (19716)
社区积分 0 (49141)
注册日期 2001-11-13
论坛徽章:0
      
      

发表于 2002-1-18 11:08 
过程问题

create procedure sp_sales_order1(in customer_id integer,in product_id integer)
result(id integer,order_date date,fin_code_id char(2),region char(7),sales_rep
integer) begin select s.id,s.order_date,s.fin_code_id,s.region,s.sales_rep
from sales_order as s,sales_order_items as i where s.cust_id=customer_id
and i.prod_id=product_id and s.id=i.id end;


以上过程为什么不能在ORACLE7。03中现实。
如果要现实该怎么办。
谢谢大家的帮助!



只看该作者    顶部
离线 抑剑
tiger


精华贴数 0
个人空间 0
技术积分 588 (3300)
社区积分 519 (1417)
注册日期 2001-9-28
论坛徽章:3
ITPUB元老会员2006贡献徽章授权会员   
      

发表于 2002-1-18 11:33 
语法都不对吧,另外只可以返回一个值,如果要返回多值的话通过包来定义集合类型
create procedure sp_sales_order1(customer_id number,product_id number)
retern pack_a.data_type
is
  b_data pack_a.data_type;
begin
select s.id,s.order_date,s.fin_code_id,s.region,s.sales_rep
into  b_data
from sales_order s,sales_order_items i where s.cust_id=customer_id
and i.prod_id=product_id and s.id=i.id;
return b_data;
end;


只看该作者    顶部
离线 foo
一般会员



精华贴数 0
个人空间 0
技术积分 340 (5835)
社区积分 105 (3420)
注册日期 2002-1-18
论坛徽章:0
      
      

发表于 2002-1-18 16:00 
I am wondering whether the procedure can use the 'return' to return the data!


只看该作者    顶部
 
    

相关内容


CopyRight 1999-2006 itpub.net All Right Reserved.
北京皓辰广域网络信息技术有限公司. 版权所有
E-mail:Webmaster@itpub.net
京ICP证:010037号 联系我们 法律顾问