Oracle Self-Join on multiple possible column matches - CONNECT BY?
问题 I have a query requirement from ----. Trying to solve it with CONNECT BY , but can't seem to get the results I need. Table (simplified): create table CSS.USER_DESC ( USER_ID VARCHAR2(30) not null, NEW_USER_ID VARCHAR2(30), GLOBAL_HR_ID CHAR(8) ) -- USER_ID is the primary key -- NEW_USER_ID is a self-referencing key -- GLOBAL_HR_ID is an ID field from another system There are two sources of user data (datafeeds)... I have to watch for mistakes in either of them when updating information.