IBM Data and AI Ideas Portal for Clients

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:

Post your ideas

If you have not registered on this portal please register at . To complete registration you will need to open the email you will receive from Aha to confirm your identity.

Post ideas and requests to enhance a product or service. Take a look at ideas others have posted and upvote them if they matter to you,

  1. Post an idea

  2. Upvote ideas that matter most to you

  3. Get feedback from the IBM team to refine your idea

Help IBM prioritize your ideas and requests

The IBM team may need your help to refine the ideas so they may ask for more information or feedback. The offering manager team will then decide if they can begin working on your idea. If they can start during the next development cycle, they will put the idea on the priority list. Each team at IBM works on a different schedule, where some ideas can be implemented right away, others may be placed on a different schedule.

Receive notification on the decision

Some ideas can be implemented at IBM, while others may not fit within the development plans for the product. In either case, the team will let you know as soon as possible. In some cases, we may be able to find alternatives for ideas which cannot be implemented in a reasonable time.

Additional Information

To view our roadmaps:

Reminder: This is not the place to submit defects or support needs, please use normal support channel for these cases

IBM Employees:

The correct URL for entering your ideas is:

DGTT - declare and use in one SQL statement (basically, this RFE is extension to syntax and functionality of DGTT)

Sometimes we use DGTT to hold complex result sets with many columns.

We must DECLARE the DGTT first… and then second, INSERT into the DGTT

The DECLARE requires us to think about each column name and type if we list them explicitly.
OR. We can DECLARE the DGTT “as (fullselect) with no data” where the “fullselct” is a copy of the SQL SELECT that will be later used with the INSERT into the DGTT.

The advantage of using the “as (fullselect) with no data” is that we don't need to think too much about the column names and types and sizes. They all come from the provided SELECT.

BUT it is subjectively “ugly” to have same “select” repeated twice in the SQL script. First, in the DGTT and second in the INSERT into DGTT.

Why can't DB2 allow us to dynamically DECLARE the DGTT and INSERT into this DGTT in one SQL statement. It seems logical!
And the DB2 syntax for DECLARE GLOBAL TEMPORARY TABLE suggests this might be possible because it obliges us to add ‘with no data' when using FULLSELECT to declare the table. 

> The existing documentation is very clear that when ‘when no data' is used that the SELECT is not executed.

How about syntax option alternative/opposite to ‘with no data' to allow us to insert immediately? (you can pick the syntax)
It seems like IBM was thinking about this already! Why else have ‘with no data' unless IBM was thinking of the ‘opposite' functionality for the future!!

ORACLE and SQLSERVER implement “declared temporary tables” differently than DB2… but the concepts exist. And in those database technologies, it is possible to declare the temporary table and insert into it in the same time! Just one SQL statement!
Basically, I would like to do the same with DB2!


  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Apr 22 2019
  • Future consideration
Who would benefit from this IDEA? application developers and dbas and keen end-users > everyone who use DGTT.
How should it work?



-- below is an example of using one SQL statement to
-- define the DGTT using "as (fullselect)" to define the DGTT
-- and then the second SQL uses the same "fullselect" to insert
-- into the DGTT

-- it would be nicer and cleaner if it was one SQL statement!  




-- declare my dgtt using a SELECT to provide column names and type
-- >> the select is not actually processed by DB2!
-- >> therefore... you don't really need much of a where clause
declare global temporary table DGTT0A
as (select left(name,7) as name7 from sysibm.systables) with no data
on commit drop table
-- now use my new dgtt using the exact same SQL
-- .. now the WHERE clause matters to "my application" requirements!
-- >> technically the select here does not need to "name" the columns
-- in the result set. but I do to have identical sql select
-- as used in the declare above
insert into session.DGTT0A
select left(name,7) as name7 from sysibm.systables
where rand() < 0.10
fetch first 99 rows only
-- now look at my result inside the dgtt
select * from session.DGTT0A order by name7;

Idea Priority Low
Priority Justification this extension to DGTT functionality seems logically. also... this functionality exists with oracle and sqlserver (and maybe DB2 for LUW?)... so why not extend to DB2 for zOS!
Client Name Brian Laube
  • Attach files

IBM's success depends on gathering feedback from customers like yourself. Aha Ideas Portal is the third party tool through which IBM Offering Managers gather feedback from customers such as yourself.
IBM is a global organization with business processes, management structures, technical systems and service provider networks that cross borders. As such, the information collected through Aha Ideas Portal (Customer Name, Customer Email Address) will be stored by them in the United States, and handled only as per IBM's instructions and policies. Your data (Name and Email Address) will NOT be shared with other IBM customers.
In order to safeguard your information in Aha, do not leave your workstation unattended while using this application, log off after using it, and print only if necessary. If you need to make a hardcopy, remember to pick up the print-out immediately, keep it under lock, and destroy it immediately when no longer needed.
NOTICE TO EU RESIDENTS: per EU Data Protection Policy, if you wish to remove your personal information from the IBM ideas portal, please login to the ideas portal using your previously registered information then change your email to "anonymous@euprivacy.out" and first name to "anonymous" and last name to "anonymous". This will ensure that IBM will not send any emails to you about all idea submissions