× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I wish to use CONNECT BY using a composite key but haven't been able to get it to work.

This article (https://developer.ibm.com/articles/i-db2connectby/) explains that each key column must be prefixed with the PRIOR operator. However, the example qualifies the keys, but doesn't demonstrate how the tables are qualified.

Select 202 Boss, Employee, Name
From Staff
Start with Boss = 202
Connect By Boss = Prior Employee;

If the join key is a composite key, each key column must be prefixed with the PRIOR operator:

CONNECT BY PRIOR a.Department = b.Department

AND PRIOR Employee = Boss

How do you use CONNECT BY using composite keys?

[CONFIDENTIALITY AND PRIVACY NOTICE] Information transmitted by this email is proprietary to Medtronic and is intended for use only by the individual or entity to which it is addressed, and may contain information that is private, privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please delete this mail from your records. To view this notice in other languages you can either select the following link or manually copy and paste the link into the address bar of a web browser: http://emaildisclaimer.medtronic.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.