Chinaunix

标题: 求租一个存储过程调用函数的问题 [打印本页]

作者: handa11    时间: 2007-11-02 10:27
标题: 求租一个存储过程调用函数的问题
CREATE procedure  ccx99.pro_chbj ( po_plc_no  char(20) ,fgs_dm char(7))
RETURNING   int;

define cg_flag  int ;


CALL f_policy();    ---------报错

FUNCTION f_policy()   --------报错

select  count(*)   into  cg_flag  from  f_chb
where plc_no=po_plc_no  and fgs=fgs_dm;


END FUNCTION----------------- 报错

return cg_flag;
  
END procedure


请问一个 在一个存储过程中怎么样调用函数呀  高手帮忙写一下
作者: wuicpp    时间: 2007-11-02 19:59
call和let,select中,应该都可以的,存储过程还可以用exec,你的函数有没有返回值。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2