Results 1 to 4 of 4

Thread: exec script

  1. #1
    Join Date
    Jan 2003
    Location
    The Netherlands
    Posts
    149

    Unanswered: exec script

    Hello,

    I want to execute the following script. Why is only the first package created? Please do not tell me why I did it this way, because I have my reasons for it!

    beforehand thanks!
    -------------------
    SET SERVEROUT ON;

    DECLARE
    Dummy VARCHAR2(1);
    sStatement VARCHAR2(4000);
    BEGIN

    BEGIN
    sStatement :=
    'CREATE OR REPLACE PACKAGE ISH.REFCURPKG AS
    TYPE rct1 IS REF CURSOR;
    END;
    ';
    EXECUTE IMMEDIATE sStatement;

    sStatement :=
    'CREATE OR REPLACE PACKAGE blddelrow_pkg
    AS
    TYPE blddeloldrowarray IS TABLE OF ish.Building%ROWTYPE INDEX BY BINARY_INTEGER;

    oldrows blddeloldrowarray;
    empty blddeloldrowarray;
    END;
    ';
    EXECUTE IMMEDIATE sStatement;
    END;

    END;
    /

  2. #2
    Join Date
    Jan 2003
    Location
    The Netherlands
    Posts
    149

    anyone?

    anyone?

  3. #3
    Join Date
    May 2003
    Location
    Dublin, Ireland
    Posts
    44

    Re: exec script

    Are you sure that only first package is being created.
    I've run the script and I have 2 packages.

    1* select object_type,object_name from user_objects where object_name like '%PKG%'
    SQL> /

    OBJECT_TYPE OBJECT_NAME
    ------------------ ------------------------------
    PACKAGE BLDDELROW_PKG
    PACKAGE REFCURPKG


    Originally posted by thepercival
    Hello,

    I want to execute the following script. Why is only the first package created? Please do not tell me why I did it this way, because I have my reasons for it!

    beforehand thanks!
    -------------------
    SET SERVEROUT ON;

    DECLARE
    Dummy VARCHAR2(1);
    sStatement VARCHAR2(4000);
    BEGIN

    BEGIN
    sStatement :=
    'CREATE OR REPLACE PACKAGE ISH.REFCURPKG AS
    TYPE rct1 IS REF CURSOR;
    END;
    ';
    EXECUTE IMMEDIATE sStatement;

    sStatement :=
    'CREATE OR REPLACE PACKAGE blddelrow_pkg
    AS
    TYPE blddeloldrowarray IS TABLE OF ish.Building%ROWTYPE INDEX BY BINARY_INTEGER;

    oldrows blddeloldrowarray;
    empty blddeloldrowarray;
    END;
    ';
    EXECUTE IMMEDIATE sStatement;
    END;

    END;
    /

  4. #4
    Join Date
    Jan 2003
    Location
    The Netherlands
    Posts
    149

    worked

    yes, i added the owner in front of the package and it worked. thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •