Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> HELP! VERY New to Oracle
I am very new to PL/SQL and Oracle in general. I am taking all that
was done in MS SQL 7.0 and now using oracle. My precudures are
very complex taking multiple tables and creating SQL statements
then needing to taking the result set from that resultset and
creating another SQL Statement. In MS SQL 7.0 the INTO was great
becuase I could then reference a temp table and use it in another
SQL Statement!
What do I need to do to this Procedure to select from the SQL Statement. I can not reference the INTO variable!.
IS
/*Get All Participation Records of LoanType = "PT" and PartType <> "IL
(Interoffice Particpations) */
/*Get Loan Balances where LoanType not in "LC", "BA", "PT" */
TYPE Proc_RecType IS RECORD
(OfficeNum Comdyear.OfficeNum%TYPE,
CliNum Comdyear.CliNum%TYPE, EOMBalance Comdyear.LoanBal%TYPE, GrossBalance Comdyear.LoanBal%TYPE, LoanName Comd02a.LoanName%TYPE);
BEGIN
SELECT Comdyear.OfficeNum, Comdyear.CliNum, SUM(Get_LoanBalance(Comdyear.LoanBal,'EOM', Comdlon2.PTType, Comd02a.LoanType)) EOMBalance, SUM(Get_LoanBalance(Comdyear.LoanBal,'Gross', Comdlon2.PTType, Comd02a.LoanType)) GrossBalance, Comd02a.LoanName INTO Proc_Rec FROM Comdyear,Comd02a,Comdlon2 WHERE (Comdyear.LoanNum=Comd02a.LoanNum AND Comdyear.Clinum=Comd02a.Clinum AND Comdyear.OfficeNum=Comd02a.OfficeNum) AND (Comd02a.LoanNum = Comdlon2.LoanNum AND Comd02a.CliNum=Comdlon2.CliNum AND Comd02a.OfficeNum=Comdlon2.OfficeNum) AND (Comdyear.Date_R BETWEEN BeginDate AND EndDate)GROUP BY Comdyear.OfficeNum, Comd02a.LoanName, Comdyear.CliNum;
OPEN FinalRS_cv FOR
SELECT LoanName,
OfficeNum, CliNum, EOMBalance, GrossBalance
END;
I get Error:
Error at Line 43, Column 9
PLS-00356: "Proc_Rec' Must be a table to which the user has access
Again, I am very new and (three days!)
Please Help Received on Sun Jun 20 1999 - 11:35:37 CDT
![]() |
![]() |