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 updateson them if they matter to you. If you can't find what you are looking for,
Post your ideas
Post an idea.
Get feedback from the IBM team and other customers to refine your idea.
Follow the idea through the IBM Ideas process.
Specific links you will want to bookmark for future use
DB2 SQL join with USING need to support nullable column
I have a problem with a JOIN when columns are nullable.
I ask for an correction of the USING feature : in the sql engine do a IS NOT DISTINCT FROM when the column is nullable, so USING will do its job.
for a better explanation, you can reproduce the problem with this sequence:
create table qtemp.autinf as ( select * from QSYS2.AUTHORIZATION_LIST_INFO ) with data ;
in this table, there are always either oname is null or path_name is null
when I try to join the table on itself with a USING
select AUTH_LIST, ONAME, OSCHEMA, PATH_NAME, SYS_OTYPE from qtemp.autinf B join qtemp.autinf A using( AUTH_LIST, ONAME, OSCHEMA, PATH_NAME, SYS_OTYPE ) ;
the resulset is empty. translation in user language: the "keys" in file B are not in file A. inconsistant.
The reason is : NULL values never "equal" each other the right way is to use the IS DISTINCT FROM clause
select b.AUTH_LIST, b.ONAME, b.OSCHEMA, b.PATH_NAME, b.SYS_OTYPE from qtemp.autinf B join qtemp.autinf A on ( b.AUTH_LIST is not distinct from a.AUTH_LIST and b.oname is not distinct from a.oname and b.oschema is not distinct from a.oschema and b.path_name is not distinct from a.path_name and B.SYS_OTYPE = a.SYS_OTYPE) ;
a few ugly and difficult to explain to user. For my users, the concept of null is just foggy.
I would like to be able to use USING (AUTH_LIST, ONAME, OSCHEMA, PATH_NAME, SYS_OTYPE )
I ask for an correction of the USING feature : in the sql engine do a IS NOT DISTINCT FROM when the column is nullable, so USING will do its job; and probably more performant because the verification of b.AUTH_LIST = a.AUTH_LIST is restricted to the case where both values ar not null ... that is to say, null values are verified before the equal.
Do not place IBM confidential, company confidential, or personal information into any field.