我不确定如何在调用另一个存储过程的存储过程中设置变量。我想保存返回的值并稍后在另一个选择中使用它。
我想做这样的事情:
PROCEDURE procName(bcur OUT IssCur)
IS
cur2 IssCur;
extCur IssCur;
exlineno varchar2(30);
BEGIN
exlineno :=getExternlineno(exlineno,'50036648','00060');
open cur2 for SELECT concat(SUBSTR(susr2, 0, INSTR(susr2, '-')-1),'' ) from OrderDetail;
要调用的存储过程
PROCEDURE getExternlineno(
oRetValue OUT varchar2,
pKey IN varchar2,
poNum IN varchar2)
AS
Begin
select externlineno into oRetValue from podetail where pokey = pKey and polinenumber = poNum;
end getExternlineno;
一旦我弄清楚如何做到这一点,我也可以分解这样的东西(它不理解 proc 名称:
SELECT concat(concat(SUBSTR(susr2, 0, INSTR(susr2, '-')-1),'' ),' - ' || getExternlineno(exlineno,'50036648','00060')) from OrderDetail;