--SQL for Active Banks SELECT BankOrgProfile.* FROM HZ_ORGANIZATION_PROFILES BankOrgProfile, HZ_CODE_ASSIGNMENTS BankCA WHERE1=1 ANDSYSDATEBETWEENTRUNC(BankOrgProfile.effective_start_date) ANDNVL(TRUNC(BankOrgProfile.effective_end_date), SYSDATE+1) AND BankCA.CLASS_CATEGORY ='BANK_INSTITUTION_TYPE' AND BankCA.CLASS_CODE IN('BANK','CLEARINGHOUSE') AND BankCA.OWNER_TABLE_NAME ='HZ_PARTIES' AND(BankCA.STATUS ='A'OR BankCA.STATUS ISNULL) AND BankCA.OWNER_TABLE_ID = BankOrgProfile.PARTY_ID