IBM Support

IT32989: UNQUALIFIED COLUMN REFERENCE WITH USING CLAUSE ON VIEW RETURNS SQLCODE=-206

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • A query as follows can fail with an SQL0206N error:
    
    SELECT TABSCHEMA , TABNAME , COLNAME FROM SYSCAT.TABLES JOIN
    SYSCAT.COLUMNS USING (TABSCHEMA, TABNAME) WHERE (TABSCHEMA,
    TABNAME) IN (SELECT TABSCHEMA, TABNAME FROM SYSCAT.INDEXES)
    
    SQL0206N "TABSCHEMA" is not valid in the context where it is
    used.
    SQLSTATE=42703
    

Local fix

  • Explicitly qualify the columns in the VIEW.
    
    For example:
    SELECT t.TABSCHEMA, t.TABNAME, c.COLNAME FROM SYSCAT.TABLES t
    JOIN SYSCAT.COLUMNS c USING (TABSCHEMA, TABNAME) WHERE
    (t.TABSCHEMA, t.TABNAME) IN (SELECT TABSCHEMA, TABNAME FROM
    SYSCAT.INDEXES)
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * all                                                          *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * See Error Description                                        *
    ****************************************************************
    * RECOMMENDATION:                                              *
    * Upgrade to 11.1.4.7                                          *
    ****************************************************************
    

Problem conclusion

  • Upgrade to 11.1.4.7
    

Temporary fix

Comments

APAR Information

  • APAR number

    IT32989

  • 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

    2020-05-27

  • Closed date

    2022-04-16

  • Last modified date

    2022-04-16

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

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

    IT32990

Fix information

  • Fixed component name

    DB2 FOR LUW

  • Fixed component ID

    DB2FORLUW

Applicable component levels

  • RB10 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"11.1","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
04 May 2022