IBM Support

JR31733: SQL SCALAR FUNCTION IN SELECT-CLAUSE BLOCKS USE OF UPDATE-CLAUSE WITH SQLSTATE 42829

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The following query should be valid:
    
    select T1.C1, MYSQLUDF( T1.C2 ) A from T1 for update
    
    where MYSQLUDF is a SQL scalar function.  The expected result is
    that the update-clause implicitly includes all updatable columns
    of table T1.  However, the query fails to compile with the
    following error:
    
    SQL0511N  The FOR UPDATE clause is not allowed because the table
    specified by the cursor cannot be modified.  SQLSTATE=42829
    

Local fix

  • Explicitly specify the updatable columns in the update-clause.
    For example, using the query above:
    
    select T1.C1, MYSQLUDF( T1.C2 ) A from T1 for update of C1, C2;
    

Problem summary

  • SQL SCALAR FUNCTION IN SELECT-CLAUSE BLOCKS USE OF
    UPDATE-CLAUSEWITH SQLSTATE 42829
    

Problem conclusion

  • First Fixed in DB2 V9.5 FP5
    

Temporary fix

  • Explicitly specify the updatable columns in the update-clause.
    For example, using the query above:
    
    select T1.C1, MYSQLUDF( T1.C2 ) A from T1 for update of C1, C2;
    

Comments

APAR Information

  • APAR number

    JR31733

  • Reported component name

    DB2 UDB ESE WIN

  • Reported component ID

    5765F4101

  • Reported release

    950

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-01-21

  • Closed date

    2010-02-05

  • Last modified date

    2010-02-05

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    JR31734

Fix information

  • Fixed component name

    DB2 UDB ESE WIN

  • Fixed component ID

    5765F4101

Applicable component levels

  • R950 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"950","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
05 February 2010