Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> HELP! VERY New to Oracle

HELP! VERY New to Oracle

From: MADEIRA SALLY <softsense_at_home.com>
Date: Sun, 20 Jun 1999 16:35:37 GMT
Message-ID: <376D1929.CFC271D8@home.com>


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!.



PROCEDURE R10_ParticipationListing
(BeginDate IN DATE:='1-JAN-99',

 EndDate IN DATE:='31-APR-99',
 FinalRS_cv IN OUT Cursor_Types.FinalRS_Cur)

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);

Proc_Rec Proc_RecType;

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

FROM Proc_Rec;

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US