PL/SQL (MOSC)

MOSC Banner

Help to Convert a Function to a Package

edited Jul 25, 2014 5:00AM in PL/SQL (MOSC) 3 commentsAnswered

I wanted to put this function,  together with other functions,  inside a package. Since it does not have a function "body", I could not figure out how to make it work. Could you please help? Thanks. - Frank

CREATE OR REPLACE FUNCTION stragg(input VARCHAR2)

    RETURN varchar2

  PARALLEL_ENABLE AGGREGATE USING STRING_AGG_TYPE;

/

CREATE OR REPLACE TYPE  "STRING_AGG_TYPE"    AS OBJECT
    (
       total VARCHAR2(4000),

       STATIC FUNCTION
            ODCIAggregateInitialize(sctx IN OUT string_agg_type )
            RETURN NUMBER,

       MEMBER FUNCTION
           ODCIAggregateIterate(self IN OUT string_agg_type ,
                                value IN VARCHAR2 )
           RETURN NUMBER,

      MEMBER FUNCTION
           ODCIAggregateTerminate(self IN string_agg_type,
                                  returnValue OUT  varchar2,

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center