procedure xp_getEhrStat_pacs(v_ehrID in varchar2,
v_special in varchar2,
v_dataCur out PK_base.cur, –????????????????
v_errorCode out number, –????????????????????>0????????????????
v_errorMsg out varchar2 –????????????????
) is
VDataType varchar2(20) := “0”;
vSql1 varchar2(3000) := “”;
vSql2 varchar2(3000) := “”;
vSql3 varchar2(3000) := “”;
begin
v_errorCode := 0;
v_special in varchar2,
v_dataCur out PK_base.cur, –????????????????
v_errorCode out number, –????????????????????>0????????????????
v_errorMsg out varchar2 –????????????????
) is
VDataType varchar2(20) := “0”;
vSql1 varchar2(3000) := “”;
vSql2 varchar2(3000) := “”;
vSql3 varchar2(3000) := “”;
begin
v_errorCode := 0;
if v_special = “0” then
vSql1 := ” select 2 as Forder,””检查”” as Fname, count(*) as FCount, “”queryExam”” as
FURL
from tbl_ehr_comm_exam
where FEHRID = ” || v_ehrID || ”
and (FExam_Item_code is null or FExam_Item_code not in(
select Fres_code from TBL_AUTH_RES_INFO where ffunc_code =
“”RES.SPECIAL.EXAM”” and fstatus =1))”;
else
vSql1 := “select 2 as Forder,””检查”” as Fname, count(*) as FCount, “”queryExam”” as
FURL
from tbl_ehr_comm_exam
where FEHRID = ” || v_ehrID;
end if;
open v_dataCur for vSql1; –using v_ehrID;
v_errorCode := sql%rowcount;
exception
when others then
v_errorCode := sqlcode;
v_errorMsg := sqlerrm;
open v_dataCur for
select * from dual where 1 = 2;
end;
解决方案
100
建议题主参考一下MYSQL官方免费手册 的存储过程的例子和语法说明先亲自修改一下,然后假如问题可以把你改好的语句和错误提示一同贴出大家进行分析。