Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2014
    Posts
    294

    Unanswered: The clauses are mutually exclusive. Sqlcode=-628, sqlstate=42613

    Hi,

    I have connected to Z/OS through IBM data studio & trying to create some user defined functions,

    CREATE FUNCTION FUNCTION1 ( )
    RETURNS TABLE (NAME VARCHAR(128))
    LANGUAGE SQL
    READS SQL DATA
    NO EXTERNAL ACTION
    DETERMINISTIC
    RETURN

    SELECT NAME FROM SYSIBM.SYSTABLES

    This is the error:

    Create user-defined function returns SQLCODE: -628, SQLSTATE: 42613.
    erty.FUNCTION1: 0: THE CLAUSES ARE MUTUALLY EXCLUSIVE. SQLCODE=-628, SQLSTATE=42613, DRIVER=4.17.30
    THE CLAUSES ARE MUTUALLY EXCLUSIVE. SQLCODE=-628, SQLSTATE=42613, DRIVER=4.17.30
    erty.FUNCTION1 - Deploy failed.
    erty.FUNCTION1 - Roll back completed successfully.

    Is this error somewhat related to admin activities or something else.

    windows : OS
    Db2: Db2 Z/os
    Client : IBM Data Studio

  2. #2
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Hi,

    what's you Z/OS DB2 version number?
    Regards,
    Mark.

  3. #3
    Join Date
    Apr 2012
    Posts
    1,034
    Provided Answers: 18
    Did you post the complete UDF source or just 1 line to select from sysibm.systables?
    Error messages like the one you posted can happen if the context or current-defaults conflict with 'reads sql data'.

  4. #4
    Join Date
    Jul 2014
    Posts
    294
    Db2 version is 8.

    This the complete UDF, not able to find the reason for the error.

  5. #5
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    SELECT NAME FROM SYSIBM.SYSTABLES
    if this is the complete code :
    - is ; not missing ?
    this will return all table names..
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  6. #6
    Join Date
    Jul 2014
    Posts
    294
    Typo mistake after adding ; too same error

    CREATE FUNCTION FUNCTION1 ( )
    RETURNS TABLE (NAME VARCHAR(128))
    LANGUAGE SQL
    READS SQL DATA
    NO EXTERNAL ACTION
    DETERMINISTIC
    RETURN

    SELECT NAME FROM SYSIBM.SYSTABLES;

    Even though the same error repeating.

  7. #7
    Join Date
    Jul 2013
    Location
    Moscow, Russia
    Posts
    666
    Provided Answers: 55
    Afaik Db2 v8 on z/os doesn't support SQL table functions.
    I suggest you to find an "SQL Reference" book namely for this db2 version.
    DB2 for z/OS Version 8 Product Documentation
    Last edited by mark.b; 09-03-15 at 13:14.
    Regards,
    Mark.

Tags for this Thread

Posting Permissions

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