Problem with Views AND Stored Procedures
Posted in 1996
I have a problem with SP and Views.
( I have waited on 10 minutes on line without Answer from Tech. Service)
I am creating the procedure in the following manner.
CREATE PROCEDURE get_status(pssn char(9), penroll_num smallint)
RETURNING CHAR(2), DATE, SMALLINT, SMALLINT;
DEFINE num_train_days SMALLINT;
DEFINE num_cal_days SMALLINT;
DEFINE stat_code CHAR(2) ;
DEFINE stat_date DATE ;
DEFINE new_date DATE ;
DEFINE old_date DATE ;
-- Code to caluculate these values.
RETURN stat_code, stat_date, num_train_days, num_cal_days ;
END PROCEDURE ;
If I run with execute procedure it works great.
EXECUTE PROCEDURE get_status(ssn, 1) it returns four values.
Bt I can't use it in the following Format.
create view v_tempstatus (ssn , stat_cd, status_dt, cl_dys, tr_days)AS
SELECT ssn, get_status(ssn, 1) from Student
where ssn < "100000000";
It gives the Error 684 : The procedure returns too many values.
We are running 7.x on RS6K machine.
Any ideas ???
Regards
Rajeev Nimmagadda SRK
rajeevn@lmis.jcdc.doleta.gov # (512)393-7208
################################################################