I am back! test a procedure through PL/SQL block

Hi all!

Do you know how to test a procedure? Please check mine, its gave me an error of what follows:-see the bottom of my test pls/sql code:
ORA-06550: line 4, column 1:
PLS-00306: wrong number or types of arguments in the call to 'MEMBER_CK_SP '.
ORA-06550: line 4, column 1:
PL/SQL: Statement ignored
2 lv_name varchar2 (20);
3. start to
4 member_ck_sp('rat55','kile',lv_name);
5 end;
6. /

CREATE OR REPLACE PROCEDURE member_ck_sp
(p_id IN VARCHAR2,
p_pw IN OUT VARCHAR2,
p_cook ON the NUMBER,
p_check OUT VARCHAR2)
IS
BEGIN
SELECT firstname. » '|| LastName, cookie
IN p_pw, p_cook
OF bb_shopper
WHERE username = p_id
AND password = p_pw;
EXCEPTION
WHEN NO_DATA_FOUND THEN
p_check: = 'INVALID ';
END;
/
-This is the test of the procedure-
declare
lv_name varchar2 (20);
Start
member_ck_sp ('rat55', 'kile', lv_name);
end;
/

For not being "Captain obvious" but your procedure takes 4 parameters, and you go to 3... so the wrong number of arguments error...

Tags: Database

Similar Questions

  • How to test a procedure returns the result set

    Hello

    I have a following code:

    {color: #0000ff} create or replace the TYPES of PACKAGING
    AS
    type cursorType is ref cursor;
    end;

    create or replace PROCEDURE GetAllCategories (p_cursor in the Types.cursorType)
    AS
    Start
    Open p_cursor for SELECT * CATEGORY;
    end; {color}

    I would like to test the procedure of * {color: #000000} visualization output resultset {color} *. How can I do with SQL Developer?
    In fact, when select RUN in SQL Developer, I got the following code:

    DECLARE
    P_CURSOR types.cursorType;
    BEGIN

    GetAllCategories (P_CURSOR = & gt; P_CURSOR);
    END;

    When I run it, it is successful but there is no result set displayed. However if I execute SELECT * FROM category only in the SQL Editor, I see the result set in the grid. Then where the result set did when he went through the procedure?

    Thanks in advance for any help.

    Published by: CarbonFiber Sep 22, 2008 20:52

    Is a simple way with sqlplus

    SQL> create or replace package types
      2  as
      3     type cursortype is ref cursor;
      4  end;
      5  /
    
    Package created.
    
    SQL> create or replace procedure getallemp(p_cursor in out types.cursortype )
      2  as
      3  begin
      4     open p_cursor for select * from emp;
      5  end;
      6  /
    
    Procedure created.
    
    SQL> var lcursor refcursor
    SQL>
    SQL> exec getallemp(:lcursor)
    
    PL/SQL procedure successfully completed.
    
    SQL> print lcursor
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20         10
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30         10
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20         10
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30         10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30         10
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10         10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20         10
          7839 KING       PRESIDENT            17-NOV-81       5000                    10         10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30         10
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20         10
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO        DIV
    ---------- ---------- --------- ---------- --------- ---------- ---------- ---------- ----------
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30         10
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20         10
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10         10
    
    14 rows selected.
    

    Thank you
    Knani.

  • I downloaded an upgrade to my adobe reader today, and since my search engine yahoo has increased and will not change to google. I have a macbook pro, help please? Anyone know how I can change this back? I tried through my settings but it

    I downloaded an upgrade to my adobe reader today, and since my search engine yahoo has increased and will not change to google. I have a macbook pro, help please? Anyone know how I can change this back? I tried through my settings but it does not work

    Hi Iférouane,

    If you are using Safari as a web browser: -.

    • Open Safari, go to the Safari menu > Preferences > General and set Google as homepage. Then, choose Google as your default search engine.

    If you use Google Chrome as the web browser: -.

    • Open Google Chrome.
    • In the upper right corner of the page, click on the Chrome Chrome menu > settings.
    • In the 'Search' section, select Google from the menu drop down.

    Let me know if you are still having a problem.

    Kind regards

    Nicos

  • Best practices for ViewObjects when inserting data through pl/sql procedure

    My applications is form of oracle database level enterprise application and developing now the new module of ADF 11 g but there is restriction that all insert, update, and delete data will be through procedures oracle pl/sql. Now my question is that adf pages should be linked with ViewObjects based on the entity object or Viewobjects not based on entity / sql query. Currently, I have pages with programmatic ViewObjects that don't rely on entity objects, or on the sql query. In these display objects, I create transient attributes and then used to create pages in the adf. Click Save, I extracted the data of the current line of ViewObject and pass it to the procedure. It's works well but I was wondering if this approach is ok or it is better for it. Ideally, I would like to create from EntityObject ViewObjects but don't have not find a way to sync entityObjects with the data inserted through procedures.

    Hello

    I have create an EO for database view and replace the doDML () - method. For insert/update, and delete, I call the pl/sql functions.

    See "38.5 basis an entity on a Package PL/SQL API object" in the merger Oracle® Fusion Middleware developer for Oracle application development Guide
    Framework.

  • How to test a procedure that takes a PARAMETER array?

    Oracle 9i

    I created a procedure that takes an ARRAY PARAMETER (essentially a list of the IDS of employees and this procedure is called from the Java side), and the procedure is to remove the employees based on employee ID list.

    I stated that the type employee_id_array is TABLE of NUMBER.

    I want to test this procedure in sqlplus, but how to move this list of 'id table used' to this procedure, so I know it works?

    Thank you.

    Sure.

    satyaki>
    satyaki>select * from v$version;
    
    BANNER
    ----------------------------------------------------------------
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    
    Elapsed: 00:00:00.01
    satyaki>
    satyaki>
    satyaki>create or replace type number_array as table of number;
      2  /
    
    Type created.
    
    Elapsed: 00:00:00.02
    satyaki>
    satyaki>
    satyaki>CREATE OR REPLACE procedure delete_employee(
      2                                               p_employee_id_array in number_array
      3                                             )
      4  as
      5  begin
      6   for i in 1 .. p_employee_id_array.count
      7   loop
      8     --dbms_output.put_line ('this employee idis is: ' || p_query_id_array(i));
      9     delete from emp
     10     where empno in (to_number(p_employee_id_array(i)));
     11   end loop;
     12  end delete_employee;
     13  /
    
    Procedure created.
    
    Elapsed: 00:00:00.13
    satyaki>
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7903                                                 1000                    10
          7499 Travor     SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    
    14 rows selected.
    
    Elapsed: 00:00:00.16
    satyaki>
    satyaki>
    satyaki>
    satyaki>
    satyaki>declare
      2     vv number_array := number_array(7903,7499);
      3  begin
      4    delete_employee(vv);
      5  end;
      6  /
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.15
    satyaki>
    satyaki>select * from emp;
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
    
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
    ---------- ---------- --------- ---------- --------- ---------- ---------- ----------
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    
    12 rows selected.
    
    Elapsed: 00:00:00.16
    satyaki>
    

    Kind regards.

    LOULOU.

  • DB procedure / function can return multiple values in a PL/SQL block

    Hi all


    I have a problem returning to the exit procedure following in PL/SQL because I have SELECT INTO variable but with no output back in my PL/SQL block even if I turned it into a function.


    . pls suggest.

    CREATE OR REPLACE PROCEDURE nominations (p_start_date AS, p_end_date IN DATE)

    IS

    v_day_id PLS_INTEGER;

    v_day_name VARCHAR2 (33);

    v_day_date DATE;

    BEGIN

    SELECT (2 + (p_start_date + (LEVEL - 1) + LEVEL - 1 - TRUNK (LEVEL - 1 + 1, "IW" + p_start_date)) AS day_id

    , TO_CHAR (LEVEL - 1, 'Day' + p_start_date) AS day_name

    , TO_CHAR (LEVEL - 1, "DD-MM-RRRR" + p_start_date) AS day_date

    IN v_day_id, v_day_name, v_day_date

    OF THE DOUBLE

    CONNECTION OF LEVEL < = 1 + p_end_date - p_start_date;

    END;

    /

    Your insert would be something like this:

    INSERT INTO PR_OPS_APPOINT_SETS (SPEC_CODE1, SPEC_CODE2, CLINIC_NO, SECTOR_ID, USER_ID, APPOINT_DATE)

    SELECT r.SPEC_CODE1, r.SPEC_CODE2, r.CLINIC_NO, r.SECTOR_ID, USER, d.APPOINT_DATE

    PR_OPS_CLINIC_RECS r

    CROSS JOIN)

    SELECT TO_DATE (TO_CHAR (LEVEL - 1, "MM/DD/RRRR" + p_start_date), "MM/DD/RRRR") AS APPOINT_DATE

    OF THE DOUBLE

    CONNECT BY LEVEL<= p_end_date="" -="" p_start_date="" +="">

    ) d

    WHERE SPEC_CODE1 = p_SPEC_CODE1

    AND SPEC_CODE2 = p_SPEC_CODE2

    AND CLINIC_NO = p_CLINIC_NO

    AND SECTOR_ID = P_SECTOR_ID;

    In terms of getting the parameters p_SPEC_CODE1, p_SPEC_CODE2, p_CLINIC_NO, P_SECTOR_ID...? I don't have enough information on your part.

  • Forms 11 g-error during the compilation of pl/sql block having retained a procedure call

    Hello

    I'm getting following error in trying to compile a when the button trigger pressed with a stored procedure call forms 11g R2

    Error on line 0...

    Declaration ignored

    Forms a button trigger (when the button pressed)

    ----------------------------------------------------------------

    do_nothing;

    Stored procedure: (10g R2 database)

    ----------------------------------------------------------------

    create or replace procedure do_nothing AS

    BEGIN
    NULL;

    END do_nothing;

    Note: This procedure works for sql as SQL Developer or plu sql tools.

    Concerning

    user10503016 wrote:

    After validation of this request, I did some tests more and found Forms 11g R2 need a minimum version of database - 10.2.0.4. Is that the reason?, because my version of the database is 10.2.0.1.

    Yes, one of the reasons.

    Hamid

  • CALL THE PROCEDURE IN THE SQL STATEMENT

    Why we cannot call a procedure inside the SQL statement?

    Hello

    Usually when you select an item should return you data. In the case of a procedure, you cannot return any return value from the procedure directly it has to be done through some settings and to access these settings, you cannot use a simple sql statement. Where as in a function, you must return one of data that can be easily obtained accordingly.

    see you soon

    VT

  • Creation of Adaptert DB to call the stored procedure in MS SQL server

    Hello

    I need to create a DB adapter to call a stored procedure in MS SQL Server.

    I went through the MS SQL Server database connecting wire

    He mentions that he must use a command line utility to generate the wsdl and xsd to call stored procedures in MS SQL server. Please indicate where this utility and how to use it.

    All links to tutorials are welcome.

    Thank you!!.

    Silas.

    The key is SOA_HOME\j2ee\home\connectors\DbAdapter\DBAdapter.jar.

    Make sure that the DBAdapter.jar is at this place

    in my case, it is

    e:\Oracle\product\soa\10.1.3\j2ee\home\connectors\DbAdapter\DBAdapter.jar

    see you soon
    James

  • I want to know how can I go back to my old hotmail as a BLOCK / STOLEN I want to know how to get back to my hotmai

    I want to know how can I go back to my old hotmail as a BLOCK / STOLEN I want to know how to get back to my hotmai

    See this article for help:

    http://blogs.msdn.com/b/securitytipstalk/archive/2010/07/07/Hotmail-hacked-take-these-steps.aspx

  • How to test different Select into a PL/SQL block?

    Hello

    I'm relatively new to PL/SQL and I'm doing several int selects only one PL/SQL block. I am faced with the fact that if a single select statement returns no data, I have to go to the when exception DATA_NOT_FOUND.

    Or, I would test selects different.

    In an authentication script, I'm looking for a table for a USER ID (USERID) and an ID application, to check if a user is registered under this username for this APPLICATION.

    There are different possibilities: 4 possibilities:
    -Existing USER name or do not exist and
    -Aplication ID found or not found for this particular USER ID.

    I would test teas 4 possibilities to obtain the status of this user do regardin this application.

    The problem is that if a select returns no rows, I'll not found exception data.
    In the example below you can see that if no line is returned, with the exception
    DECLARE
    P_USERID VARCHAR2(400) DEFAULT NULL;
    P_APPLICATION_ID NUMBER DEFAULT NULL;
    P_REGISTERED VARCHAR2(400) DEFAULT NULL;
    BEGIN
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID AND APPLICATION_ID = :APP_ID ;
    :P39_TYPE_UTILISATEUR := 'USER_REGISTERED';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    :P39_TYPE_UTILISATEUR := 'USER_NOT_FOUND';
    END;
    I would like to first of all make this statement:
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID 
    Do this if the user is found:
    SELECT DISTINCT(USERID) INTO P_USERID FROM ACL_EMPLOYEES
    WHERE  USERID = :P39_USERID AND APPLICATION_ID = :APP_ID ;
    etc...

    Basically, I don't want to go to the not found exception before you have tested the 4 possibilities.

    Do you have a suggestion?

    Thank you very much for your help!

    Christian

    If you I had to check several conditions, this is how I would do:

    DECLARE
      P_USERID         VARCHAR2(400) DEFAULT NULL;
      P_APPLICATION_ID NUMBER DEFAULT NULL;
      P_REGISTERED     VARCHAR2(400) DEFAULT NULL;
    BEGIN
     SELECT USERID
         , MAX(DECODE(application_id, :APP_ID, :APP_ID)) app_id_valid
      INTO P_USERID
         , P_APPLICATION_ID
      FROM ACL_EMPLOYEES
     WHERE USERID = :P39_USERID
     GROUP BY USERID
    
     IF P_APPLICATION_ID IS NULL
     THEN
       :P39_TYPE_UTILISATEUR := 'NOT REGISTERED TO APPLICATION_ID';
     ELSE
       :P39_TYPE_UTILISATEUR := 'USER_REGISTERED';
     END IF;
    EXCEPTION
      WHEN NO_DATA_FOUND
      THEN
        :P39_TYPE_UTILISATEUR := 'USER_NOT_FOUND';
    END;
    /
    

    not tested

    C.

  • Procedure to run pubs block

    Hi all.
    I need to execute the pl/sql procedure to run pubs block.
    I'm doing it with exec but in error:

    Start
    RUN IMMEDIATELY.
    exec FillTestForOperation';
    end;
    /

    Start
    *
    ERROR on line 1:
    ORA-00900: invalid SQL statement
    ORA-06512: at line 2

    Is it possible to do?
    begin
      EXECUTE IMMEDIATE 'begin FillTestForOperation; end';
    end;
    

    or why not simply...

    begin
      FillTestForOperation;
    end;
    
  • Generation of a dynamic value through pl/sql in shell.

    Hi all


    Generation of a dynamic value through pl/sql in shell.

    host_command ("echo" Insert into CUSTOM (FIRSTNAME) VALUES ("| v_temp |");) « ») ;


    Output current:

    Insert into CUSTOMERS (FIRSTNAME) VALUES (John);

    power required:

    Insert into CUSTOMERS (FIRSTNAME) VALUES ('John');

    Thank you.

    Your request must so->

    host_command ('echo " Insert into CUSTOM (FIRSTNAME) VALUES ('||chr(39)||v_temp||chr(39)||');" ');
    

    Kind regards.

    LOULOU.

  • Call the recursive procedure through sql

    Currently, I need to implement a report on GIS. The report should be called in a statement "select of.

    Here is the initial request, I wrote.  The query has been compiled successfully and the return of the expected values. Note that it is recursive.

    ----------------------------------------------------------------------

    Recursive procedure

    ----------------------------------------------------------------------

    CREATE OR REPLACE PROCEDURE FIND_RELATIONSHIP (SEARCH_CRITERIA CUST_PERSON_TABLE_TEST. CUST_ID % TYPE, INPUT_RELATIONSHIP IN VARCHAR2)

    IS

    NUMBER OF RETURN_REC;

    TYPE XYZ_1 IS REF CURSOR CUST_PERSON_TABLE_TEST RETURN % ROWTYPE;

    CURSOR_PRCI XYZ_1;

    PRCI_FIELD1 CUST_PERSON_TABLE_TEST % ROWTYPE;

    METER NUMBER;

    OUT_RELATIONSHIP VARCHAR2 (100);

    PASS_VAL CUST_PERSON_TABLE_TEST. CUST_ID % TYPE;

    BEGIN

    COUNTER: = 1;

    CURSOR_PRCI OPEN FOR SELECT * FROM CUST_PERSON_TABLE_TEST WHERE CUST_ID = SEARCH_CRITERIA;

    EXTRACT THE CURSOR_PRCI IN PRCI_FIELD1;

    LOOP

    When the output CURSOR_PRCI % NOTFOUND;

    OUT_RELATIONSHIP: = INPUT_RELATIONSHIP |'. ' || METER;

    DBMS_OUTPUT. PUT_LINE (OUT_RELATIONSHIP |') -' || PRCI_FIELD1. PERSON_RELTN_CUST_ID |' -' || PRCI_FIELD1. PERSON_RELTN_NAME |' -' || PRCI_FIELD1. CUST_RELTN_CODE);

    PASS_VAL: = PRCI_FIELD1. PERSON_RELTN_CUST_ID;

    FIND_RELATIONSHIP (PASS_VAL, OUT_RELATIONSHIP);

    EXTRACT THE CURSOR_PRCI IN PRCI_FIELD1;

    COUNTER: = COUNTER + 1;

    END LOOP;

    CLOSE CURSOR_PRCI;

    END;

    SET SERVEROUTPUT ON

    DECLARE

    BEGIN

    DBMS_OUTPUT. PUT_LINE('1.) OF1061769');

    FIND_RELATIONSHIP('OF1061769','1');

    END;

    /

    According to some articles, we cannot call a procedure with a select statement, so I had to convert to a function. It can be compiled, but when the select is a failure.

    ----------------------------------------------------------------

    Converted to a function procedure

    ----------------------------------------------------------------

    CREATE OR REPLACE PACKAGE IN THE RELATIONSHIP_PKG

    TYPE OUTPUT_RELATIONSHIP IS (RECORD

    OUT_RELATIONSHIP VARCHAR2 (100),

    PERSON_RELTN_CUST_ID VARCHAR2 (BYTE 9),

    PERSON_RELTN_NAME VARCHAR2 (80 BYTE),

    CUST_RELTN_CODE VARCHAR2 (5 BYTE));

    TYPE T_O_RELATIONSHIP IS TABLE OF THE OUTPUT_RELATIONSHIP;

    FUNCTION FIND_RELATIONSHIP (SEARCH_CRITERIA VARCHAR2, VARCHAR2 INPUT_RELATIONSHIP)

    RETURN T_O_RELATIONSHIP;

    END;

    /

    CREATE OR REPLACE PACKAGE BODY RELATIONSHIP_PKG AS

    FUNCTION FIND_RELATIONSHIP (SEARCH_CRITERIA IN VARCHAR2, INPUT_RELATIONSHIP IN VARCHAR2)

    T_O_RELATIONSHIP IS back

    FEED_DATA OUTPUT_RELATIONSHIP;

    NUMBER OF RETURN_REC;

    TYPE XYZ_1 IS REF CURSOR CUST_PERSON_TABLE_TEST RETURN % ROWTYPE;

    CURSOR_PRCI XYZ_1;

    PRCI_FIELD1 CUST_PERSON_TABLE_TEST % ROWTYPE;

    METER NUMBER;

    OUT_RELATIONSHIP VARCHAR2 (100);

    PASS_VAL CUST_PERSON_TABLE_TEST. CUST_ID % TYPE;

    BEGIN

    COUNTER: = 1;

    CURSOR_PRCI OPEN FOR SELECT * FROM CUST_PERSON_TABLE_TEST WHERE CUST_ID = SEARCH_CRITERIA;

    EXTRACT THE CURSOR_PRCI IN PRCI_FIELD1;

    LOOP

    When the output CURSOR_PRCI % NOTFOUND;

    OUT_RELATIONSHIP: = INPUT_RELATIONSHIP |'. ' || METER;

    -DBMS_OUTPUT. PUT_LINE (OUT_RELATIONSHIP |') -' || PRCI_FIELD1. PERSON_RELTN_CUST_ID |' -' || PRCI_FIELD1. PERSON_RELTN_NAME |' -' || PRCI_FIELD1. CUST_RELTN_CODE);

    SELECT OUT_RELATIONSHIP, PRCI_FIELD1. PERSON_RELTN_CUST_ID, PRCI_FIELD1. PERSON_RELTN_NAME, PRCI_FIELD1. CUST_RELTN_CODE IN DOUBLE FEED_DATA;

    -PIPE ROW (FEED_DATA);

    PASS_VAL: = PRCI_FIELD1. PERSON_RELTN_CUST_ID;

    -BACK RELATIONSHIP_PKG. FIND_RELATIONSHIP (PASS_VAL, OUT_RELATIONSHIP);

    EXTRACT THE CURSOR_PRCI IN PRCI_FIELD1;

    COUNTER: = COUNTER + 1;

    END LOOP;

    CLOSE CURSOR_PRCI;

    END FIND_RELATIONSHIP;

    END;

    /

    But when running.

    SELECT * from table (RELATIONSHIP_PKG. FIND_RELATIONSHIP('OF1061769','1'))

    I get invalid data type

    EXEC RELATIONSHIP_PKG. FIND_RELATIONSHIP('OF1061769','1');

    Above code returns Find_relationship is not a procedure or is undefined ORA06550.

    Can anyone advise me on the conversion of the work to a function procedure, as FIND_RELATIONSHIP(PASS_VAL,OUT_RELATIONSHIP) wrote in the service fails.

    Or someone help me hidden in a function that can be called in a select statement.

    What you wrote, it seems that it is possible using a hierarchical query.

    Hierarchical queries

    Why don't you start with a small "CREATE TABLE" and some "INSERT" statements followed by your desired results.

    Re: 2. How can I ask a question in the forums?

    Thank you

    MK

  • Test my procedure

    Hello

    Test1 is a table with 2 columns,

    musterino, number

    musteriadi, varchar2 (50)

    and my procedure is below,

    procedure readtest1 (number of p_musterino, r_test1 in out nocopy test1% rowtype) is

    cursor c is

    Select *.

    l test1

    where l.musteri_no = p_musterino;

    Start

    Open c;

    extract the c in r_test1;

    close c;

    end um_package;

    now I need my test procedure

    Start

    um_package.readtest1(1008,???);

    end;

    How can I send values for the r_test1 parameter?

    Concerning

    declare

    vResult test1% rowtype;

    Start

    umpackage.readtest1(1008,vResult);

    end;

Maybe you are looking for