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 Not under consideration
Workspace IBM i
Categories Db2 for i
Created by Guest
Created on Jan 9, 2023

Allow variable number of arguments on SQL CONCAT function

The current implementation of CONCAT only allows two parameters, for example CONCAT('hello', 'world') which makes concatenating multiple values cumbersome. This would for example result in CONCAT(CONCAT('hello', 'world'), 'again') for 3 strings.

It would be handy to write CONCAT('hello', 'world', 'again') which is easier to read and much shorter.

Idea priority High
  • Guest
    Reply
    |
    Mar 24, 2023
    IBM does not intend to provide the requested solution to this Idea at this time, so it is being closed.

    Since we have two forms of infix concatenation, we do not intend to extend the CONCAT scalar function to have more than 2 arguments.

    The infix double bar concat || poses problems with some CCSIDs, so we agree it should be avoided in most cases. Using the infix CONCAT keyword is the preferred choice for constructing strings from multiple values.
  • Guest
    Reply
    |
    Feb 9, 2023

    I'm aware that you can use the double pipe symbol, however this is a CCSID sensitive (ie; example 37 versus 500 ) character which I'd rather avoid as it often results in issues.

    Another solution would be that the + sign is just overloaded in SQL to concatenate strings.

  • Guest
    Reply
    |
    Feb 9, 2023
    IBM has received your Idea and is evaluating it. IBM will provide a response after evaluation is complete.

    Note that you can use CONCAT instead of || as an infix operator.
    'a' CONCAT 'b' CONCAT 12345

    Db2 for i development
    IBM Power Systems Development
  • Guest
    Reply
    |
    Jan 27, 2023

    I really like this one and think it would be extreamly useful if you have have a unlimited about of concatinations. This would be extreamly helpful if you are building up commands for the QCMDEXC scalar function!

  • Guest
    Reply
    |
    Jan 19, 2023

    Another way to concatenate is the usage of the double pipe ||. This is a shortcut that is the equivalent of using the concat function.

    For example, values 'hello' || 'world';

    or, values 'hello' || 'world' || 'again';


    I personally use the double pipe for concatenation over the concat function.