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

Home -> Community -> Usenet -> c.d.o.server -> Re: testing oracle package

Re: testing oracle package

From: DA Morgan <damorgan_at_exesolutions.com>
Date: Wed, 29 Jan 2003 10:46:23 -0800
Message-ID: <3E38217F.B7A0BB0C@exesolutions.com>


realvert wrote:

> Hi
>
> Currently trying to test my oracle package
> Fleet.SELECT_CARAPPLICATIONBYQUOTE
> which accepts the following SELECT_CARAPPLICATIONBYQUOTE(stringtype,
> Cursortype)
>
> The problem i have is, i use the following syntax to (try to) test it.
> and i know i need to declare a cursor type but i just cannot solve it
> and there for am unable to test my proc.
>
> Any Clues would be greatly appreciated.
>
> regards
>
> Robin
>
> --Test Call --
> BEGIN
> fleet_pkg.SELECT_CARAPPLICATIONBYQUOTE('13456',robinCur);
> END;
>
> ----Package Code as follows ---
> CREATE OR REPLACE PACKAGE FLEET_PKG
> AS
> TYPE car_appCur IS REF CURSOR;
>
> PROCEDURE Select_CarApplicationByQuote(in_quoteref IN VARCHAR2,
> app_cursor IN OUT car_appCur );
>
> PROCEDURE Select_CarApplicationByQuote(in_quoteref IN VARCHAR2,
> app_cursor IN OUT car_appCur ) IS
> BEGIN
> Open app_cursor FOR
>
> SELECT ID,FK_EMPLOYEE_ID, APPLICATION_DATE, ACTIVE, SIGNED_OFF,
> SIGNOFF_DATE, REQUIRED_DATE, MONTHLY_COST, AVCQUOTE_REF
>
> FROM EMPLOYEE_CAR_APPLICATION
> WHERE AVCQUOTE_REF = in_quoteref;
>
> END Select_CarApplicationByQuote;

To test with a REF CURSOR you must call it from within an anonymous block that can receive that REF CURSOR and display its contents by inserting into a table or using DBMS_OUTPUT.

Daniel Morgan Received on Wed Jan 29 2003 - 12:46:23 CST

Original text of this message

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