create or replace procedure pname(date1 in varchar,jzuser.ecw_jjsdj_countview.slslrq%type,code in jzuser.ecw_jjsdj_countview.ajcode%type,coderesult out jzuser.ecw_jjsdj_countview.ajcode%type,resultnum out number) as begin select substr(code,2,4) into resultcode,count(rowid) into num from jzuser.ecw_jjsldj_countview a where substr(code,2,2) = '33' and slslrq between add_months(to_date(date1,'YYYY-MM-DD HH:MI:SS'),-1) and to_date(date1,'YYYY-MM-DD HH:MI:SS') and 1=1 group by substr(code,2,4) end; 我不知道对不对,我只能这样理解了。
begin
select substr(code,2,4) into resultcode,count(rowid) into num from jzuser.ecw_jjsldj_countview a where substr(code,2,2) = '33' and slslrq between add_months(to_date(date1,'YYYY-MM-DD HH:MI:SS'),-1) and to_date(date1,'YYYY-MM-DD HH:MI:SS') and 1=1 group by substr(code,2,4)
end;
我不知道对不对,我只能这样理解了。