Skip to Main Content
IBM Power Ideas Portal


This portal is to open public enhancement requests against IBM Power Systems products, including IBM i. To view all of your ideas submitted to IBM, create and manage groups of Ideas, or create an idea explicitly set to be either visible by all (public) or visible only to you and IBM (private), use the IBM Unified Ideas Portal (https://ideas.ibm.com).


Shape the future of IBM!

We invite you to shape the future of IBM, including product roadmaps, by submitting ideas that matter to you the most. Here's how it works:

Search existing ideas

Start by searching and reviewing ideas and requests to enhance a product or service. Take a look at ideas others have posted, and add a comment, vote, or subscribe to updates on them if they matter to you. If you can't find what you are looking for,

Post your ideas
  1. Post an idea.

  2. Get feedback from the IBM team and other customers to refine your idea.

  3. Follow the idea through the IBM Ideas process.


Specific links you will want to bookmark for future use

Welcome to the IBM Ideas Portal (https://www.ibm.com/ideas) - Use this site to find out additional information and details about the IBM Ideas process and statuses.

IBM Unified Ideas Portal (https://ideas.ibm.com) - Use this site to view all of your ideas, create new ideas for any IBM product, or search for ideas across all of IBM.

ideasibm@us.ibm.com - Use this email to suggest enhancements to the Ideas process or request help from IBM for submitting your Ideas.

Status Delivered
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Jan 4, 2021

Please add comment ability into SQL views.

Working with a mix of tables, views, physical, logical files, etc. there is a huge need to store comments in views that are built over physical files. This probably should be added to other SQL type.

Recently, at year end I had to change views and there was no comments, notes etc. The manager asked why those exist and what were they used for.

The answer is guesswork.


Use Case:

Views are created over tables and physical files. Due to SOX restrictions many companies that I consult with have strict rules about change and modernization.

With SQL you no not need to keep source as it can be regenerated from the object. When you do that, only the basics are retrieved and displayed.

There is a need to store comments and notes and maybe other stuff within the objects so that when the source is retrieved/regenerated, that information is retrieved.


Idea priority High
  • Guest
    Reply
    |
    Jan 19, 2021

    IBM believes that the request described has been solved.

    There are several ways to record comments for a view.
    1. Within the query part of the view, all embedded comments (using /* */ or --) are kept as part of the view text that is used when generating the SQL for a create view statement. If you enclose the query in parentheses, comments after the initial paren and before the SELECT keyword are included in the text. This is a good location to add view details.
    2. The COMMENT ON TABLE statement can be used to record up to 2000 characters of descriptive text associated with the view.
    3. The COMMENT ON COLUMN statement can be used to record up to 2000 characters of descriptive text for each column in the view.

    When the DDL is generated for a view, the comments are (by default) generated as well, grouping this associated documentation with the view definition.

  • Guest
    Reply
    |
    Jan 19, 2021

    The CAAC has reviewed this requirement and recommends that IBM not implement this request. Although this point cannot be done today: "Views, indexes, etc. built over physical files have no way of retrieving COMMENTS etc from the physical files.", the others are already available within the CREATE statement. The COMMENT ON function gives you the other functionality that was requested, as well as doing a /* */ type of comment.

    Background: The COMMON Americas Advisory Council (CAAC) members have a broad range of experience in working with small and medium-sized IBM i customers. CAAC has a key role in working with IBM i development to help assess the value and impact of individual RFEs on the broader IBM i community, and has therefore reviewed your RFE.

    For more information about CAAC, see www.common.org/caac

    For more details about CAAC's role with RFEs, see http://www.ibmsystemsmag.com/Blogs/i-Can/May-2017/COMMON-Americas-Advisory-Council-%28CAAC%29-and-RFEs/

    Nancy Uthke-Schmucki - CAAC Program Manager

  • Guest
    Reply
    |
    Jan 5, 2021

    Moreover, LABEL ON TABLE and COMMENT ON TABLE also works for views.

  • Guest
    Reply
    |
    Jan 4, 2021

    It is already possible to put SQL comments in and around the SELECT statement - here is an example -

    CREATE OR REPLACE VIEW labqm01/view1 AS SELECT ACTNO, ACTDESC /* no ACTKWD */ FROM LABQM01.ACT

    The comment can be placed between /* and */, instead of after the --, although that can also work.

    The CL-style comments have been around at least since 7.3, I ran the above on a 7.4 box.

    Vern Hamberg
    CAAC member