IBM Support

IT19165: FETCH-FIRST-CLAUSE RESULTS IN SQL0104N

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A SQL104N error is returned if a fetch-first-clause is specified
    after an isolation-clause or
    concurrent-access-resolution-clause. For example:
    
    select * from T optimize for 1 row fetch first 1 row only
    SQL0104N  An unexpected token "select * from T" was found
    following "BEGIN-OF-STATEMENT".  Expected tokens may include:
    "<query_expr_body>". &#160;SQLSTATE=42601
    

Local fix

  • Change the SQL statement such that the fetch-first-clause
    precedes isolation-clause and/or
    concurrent-access-resolution-clause, e.g.:
    
    select * from T fetch first 1 row only optimize for 1 row
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * All users prior to Db2 v11.1 m3 fp3.                         *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Please upgrade Db2 to v11.1 m3 fp3.                          *
    ****************************************************************
    

Problem conclusion

  • Problem is first fixed in Db2 v11.1 m3 fp3.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT19165

  • Reported component name

    DB2 FOR LUW

  • Reported component ID

    DB2FORLUW

  • Reported release

    B10

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-02-08

  • Closed date

    2018-03-15

  • Last modified date

    2018-03-15

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

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

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RA50 PSY

       UP

  • RB10 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 March 2018