1502: where SUPER_NAME = local.NAME
1503: or SUB_NAME = local.NAME)
1504: and not exists
1505: (select NULL
1506: from WF_USER_ROLE_ASSIGNMENTS
1507: where USER_NAME = local.NAME
1508: and RELATIONSHIP_ID <> -1)
1509: and not exists
1510: (select NULL
1541: where local.USER_NAME = rcurs2.name
1542: and local.USER_ORIG_SYSTEM = rcurs2.orig_system
1543: and local.USER_ORIG_SYSTEM_ID = rcurs2.orig_system_id;
1544:
1545: delete from WF_USER_ROLE_ASSIGNMENTS local
1546: where local.USER_NAME = rcurs2.name
1547: and local.USER_ORIG_SYSTEM = rcurs2.orig_system
1548: and local.USER_ORIG_SYSTEM_ID = rcurs2.orig_system_id;
1549: else
1551: where local.ROLE_NAME = rcurs2.name
1552: and local.ROLE_ORIG_SYSTEM = rcurs2.orig_system
1553: and local.ROLE_ORIG_SYSTEM_ID = rcurs2.orig_system_id;
1554:
1555: delete from WF_USER_ROLE_ASSIGNMENTS local
1556: where local.ROLE_NAME = rcurs2.name
1557: and local.ROLE_ORIG_SYSTEM = rcurs2.orig_system
1558: and local.ROLE_ORIG_SYSTEM_ID = rcurs2.orig_system_id;
1559:
1576: where local.USER_NAME = rcurs.name
1577: and local.USER_ORIG_SYSTEM = rcurs.orig_system
1578: and local.USER_ORIG_SYSTEM_ID = rcurs.orig_system_id;
1579:
1580: delete from WF_USER_ROLE_ASSIGNMENTS local
1581: where local.USER_NAME = rcurs.name
1582: and local.USER_ORIG_SYSTEM = rcurs.orig_system
1583: and local.USER_ORIG_SYSTEM_ID = rcurs.orig_system_id;
1584: else
1586: where local.ROLE_NAME = rcurs.name
1587: and local.ROLE_ORIG_SYSTEM = rcurs.orig_system
1588: and local.ROLE_ORIG_SYSTEM_ID = rcurs.orig_system_id;
1589:
1590: delete from WF_USER_ROLE_ASSIGNMENTS local
1591: where local.ROLE_NAME = rcurs.name
1592: and local.ROLE_ORIG_SYSTEM = rcurs.orig_system
1593: and local.ROLE_ORIG_SYSTEM_ID = rcurs.orig_system_id;
1594: