Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2004
    Posts
    20

    Unanswered: db2 V8: Problem in Modifies SQL Data

    Hi All,

    I am running db2 V8, no fixpacks, on win 2k Prof. I am trying to put in the 'modifies sql data' clause in my function but the compiler says:

    Multiple or conflicting keywords involving the "LANGUAGE SQL" clause
    are present


    I know that this was a problem with version 7 which was solved in fix pack 4 but has it reappeared in version 8? If not, the what is the solution?


    Thanks and Regards,
    Deepak Ajmera

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: db2 V8: Problem in Modifies SQL Data

    AFAIK, MODIFIES SQL DATA was not available in V7.2 or till V8 FP3 ... It was introduced in FP4

    Cheers
    Sathyaram


    Originally posted by deepaka
    Hi All,

    I am running db2 V8, no fixpacks, on win 2k Prof. I am trying to put in the 'modifies sql data' clause in my function but the compiler says:

    Multiple or conflicting keywords involving the "LANGUAGE SQL" clause
    are present


    I know that this was a problem with version 7 which was solved in fix pack 4 but has it reappeared in version 8? If not, the what is the solution?


    Thanks and Regards,
    Deepak Ajmera
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2004
    Posts
    20

    Re: db2 V8: Problem in Modifies SQL Data

    Originally posted by sathyaram_s
    AFAIK, MODIFIES SQL DATA was not available in V7.2 or till V8 FP3 ... It was introduced in FP4

    Cheers
    Sathyaram
    Hi Sathyaram,

    I tried installing fix pack 4 and now I am running db2 version 8 FP4 but still the error is persisting. The function is:

    CREATE FUNCTION deepaka.FUNCTION1( )
    RETURNS INTEGER
    modifies sql data
    ------------------------------------------------------------------------
    -- SQL UDF (Scalar)
    ------------------------------------------------------------------------
    F1: BEGIN ATOMIC
    insert into t1 values (11);
    RETURN 1;
    END

    and it is not compiling. I tried scanning the docs but could not find the modifies sql data clause with the create function syntax. What's the problem? Solution?

    Regards,
    Deepak Ajmera

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: db2 V8: Problem in Modifies SQL Data

    Have you updated you documentation ?

    With every fixpack, IBM releases a 'fix' for your documentation ...

    Go to www.ibm.com/db2/library for the latest set of documents ...

    Cheers
    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Jan 2004
    Posts
    20

    Re: db2 V8: Problem in Modifies SQL Data

    Originally posted by sathyaram_s
    Have you updated you documentation ?

    With every fixpack, IBM releases a 'fix' for your documentation ...

    Go to www.ibm.com/db2/library for the latest set of documents ...

    Cheers
    Sathyaram
    Hi Sathyaram,

    Yes, the documentation says that "DB2 now supports use of SQL statements that modifydata within the body of SQL table functions" but still my function is giving me the same error. The db2level output is:

    DB21085I Instance "DB2" uses "32" bits and DB2 code release "SQL08014" with
    level identifier "02050106".
    Informational tokens are "DB2 v8.1.4.341", "s031027", "WR21326", and FixPak
    "4".
    Product is installed at "C:\PROGRA~1\IBM\SQLLib".

    What's going wrong? Please help as I am totally lost....


    Regards,
    Deepak Ajmera

  6. #6
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Rebing Packages

    Hi Deepak,

    Just for a checklist... did you rebind all the necessary packages.

    Do a db2rbind for all your databases probably that would make a difference.

    HTH

    nitin.
    HTH

    Nitin

    Ask the experienced rather than the learned

Posting Permissions

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