/* procedure count_Terminal_Num(terminalType in number, --终端类型
orgID in number, --组织ID
sDate in sysdate, --安装日期
countNum out number) --数量
IS
BEGIN
CASE terminalType
when 0 then
select count(b.rtuid) into :countNum
from apowerplant a,artu_cz b
where a.cpid=:orgID and a.ppid =b.ppid ;
WHEN 1 then
countNum:=1;
ELSE
countNum:=0;
END CASE;
END count_Terminal_Num; */
orgID in number, --组织ID
sDate in sysdate, --安装日期
countNum out number) --数量
IS
BEGIN
CASE terminalType
when 0 then
select count(b.rtuid) into :countNum
from apowerplant a,artu_cz b
where a.cpid=:orgID and a.ppid =b.ppid ;
WHEN 1 then
countNum:=1;
ELSE
countNum:=0;
END CASE;
END count_Terminal_Num; */
create or replace procedure count_Terminal_Num(terminalType in number, --终端类型
orgID in number, --组织ID
sDate in sysdate, --安装日期
countNum out number) --数量
IS
BEGIN
CASE terminalType
when 0 then
select count(b.rtuid)
into :countNum
from apowerplant a, artu_cz b
where a.cpid = :orgID
and a.ppid = b.ppid;
WHEN 1 then
countNum := 1;
ELSE
countNum := 0;
END CASE;
END count_Terminal_Num;
select count(b.rtuid) into :countNum
from apowerplant a,artu_cz b
where a.cpid=:orgID and a.ppid =b.ppid ;
改为select
select count(b.rtuid) into :countNum
from apowerplant a,artu_cz b
where a.cpid=:orgID and a.ppid =b.ppid ;countNum,orgID前面多了个冒号