Problem in deploying the function on DB2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maliks
    New Member
    • Jan 2007
    • 1

    #1

    Problem in deploying the function on DB2

    Hi all,

    I am very new to the DB2 environment. I am facing a problem in deploying a function on the database. Function is calling a procedure which contains the update statement in it.

    The function and procedure both have "MODIFIES SQL DATA". Procedure get deployed but when I am trying to deploy the function it says Multiple or conflicting keywords involving the "MODIFIES SQL DATA" clause are present.

    The lines of code in function are as below:
    CREATE FUNCTION getObjectID(nCl assID INTEGER)
    RETURNS INTEGER
    LANGUAGE SQL
    NOT DETERMINISTIC
    EXTERNAL ACTION
    MODIFIES SQL DATA
    CALLED ON NULL INPUT
    BEGIN ATOMIC

    DECLARE nRet INTEGER DEFAULT 0;

    CALL BCONE50.getObje ctID_IMPL(nClas sID, nRet);

    RETURN nRet;
    END


    and for the procedure they looks like as below:

    CREATE PROCEDURE getObjectID_IMP L
    (
    IN nClassID INTEGER,
    OUT nRet INTEGER
    )
    LANGUAGE SQL
    MODIFIES SQL DATA
    CALLED ON NULL INPUT
    BEGIN
    -- logic
    END

    can anyone help me out how I can get rid of the error and deploy the function.

    Thanks in advance.

    Sandeep
Working...