Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
SELECT a.FIN_COA_CD
      ,a.ACCOUNT_NBR
      ,a.ACCOUNT_NM
      ,a.ACCT_FSC_OFC_UID
      ,a.ACCT_SPVSR_UNVL_ID
      ,a.ACCT_MGR_UNVL_ID
      ,a.ORG_CD
      ,a.ACCT_TYP_CD
      ,a.ACCT_PHYS_CMP_CD
      ,a.SUB_FUND_GRP_CD
      ,a.ACCT_FRNG_BNFT_CD
      ,a.FIN_HGH_ED_FUNC_CD
      ,a.ACCT_RSTRC_STAT_CD
      ,a.ACCT_RSTRC_STAT_DT
      ,a.ACCT_CITY_NM
      ,a.ACCT_STATE_CD
      ,a.ACCT_STREET_ADDR
      ,a.ACCT_ZIP_CD
      ,a.RPTS_TO_FIN_COA_CD
      ,a.RPTS_TO_ACCT_NBR
      ,a.ACCT_CREATE_DT
      ,a.ACCT_EFFECT_DT
      ,a.ACCT_EXPIRATION_DT
      ,a.CONT_FIN_COA_CD
      ,a.CONT_ACCOUNT_NBR
      ,a.ENDOW_FIN_COA_CD
      ,a.ENDOW_ACCOUNT_NBR
      ,a.CONTR_CTRL_FCOA_CD
      ,a.CONTR_CTRLACCT_NBR
      ,a.INCOME_FIN_COA_CD
      ,a.INCOME_ACCOUNT_NBR
      ,a.ACCT_ICR_TYP_CD
      ,a.AC_CSTM_ICREXCL_CD
      ,a.FIN_SERIES_ID
      ,a.ICR_FIN_COA_CD
      ,a.ICR_ACCOUNT_NBR
      ,a.ACCT_IN_FP_CD
      ,a.BDGT_REC_LVL_CD
      ,a.ACCT_SF_CD
      ,a.ACCT_PND_SF_CD
      ,a.FIN_EXT_ENC_SF_CD
      ,a.FIN_INT_ENC_SF_CD
      ,a.FIN_PRE_ENC_SF_CD
      ,a.FIN_OBJ_PRSCTRL_CD
      ,a.CG_CFDA_NBR
      ,a.ACCT_OFF_CMP_IND
      ,a.ACCT_CLOSED_IND
      ,CG_ACCT_RESP_ID
      ,b.UC_LOC_CD
      ,b.UC_ACCT_NBR
      ,b.UC_FUND_NBR
      ,b.UCI_CAPITAL_CAT_CD
FROM ca_account_t a
LEFT OUTER JOIN ca_account_ext_t b on (a.FIN_COA_CD = b.FIN_COA_CD and a.ACCOUNT_NBR = b.ACCOUNT_NBR)
WHERE
  a.ACCT_CLOSED_IND <> 'Y'
  AND (a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
  AND a.ACCT_EFFECT_DT <= GETDATE()
  AND ((a.FIN_COA_CD='<kfsChartCode1>' AND ACCOUNT_NBR='<kfsAcctNumber1>') OR 
       (a.FIN_COA_CD='<kfsChartCode2>' AND ACCOUNT_NBR='<kfsAcctNumber2>') OR
       . . . etc
      )
 

...

Code Block
SELECT a.FIN_COA_CD
      ,a.ACCOUNT_NBR
      ,a.ACCOUNT_NM
      ,a.ACCT_FSC_OFC_UID
      ,a.ACCT_SPVSR_UNVL_ID
      ,a.ACCT_MGR_UNVL_ID
      ,a.ORG_CD
      ,a.ACCT_TYP_CD
      ,a.ACCT_PHYS_CMP_CD
      ,a.SUB_FUND_GRP_CD
      ,a.ACCT_FRNG_BNFT_CD
      ,a.FIN_HGH_ED_FUNC_CD
      ,a.ACCT_RSTRC_STAT_CD
      ,a.ACCT_RSTRC_STAT_DT
      ,a.ACCT_CITY_NM
      ,a.ACCT_STATE_CD
      ,a.ACCT_STREET_ADDR
      ,a.ACCT_ZIP_CD
      ,a.RPTS_TO_FIN_COA_CD
      ,a.RPTS_TO_ACCT_NBR
      ,a.ACCT_CREATE_DT
      ,a.ACCT_EFFECT_DT
      ,a.ACCT_EXPIRATION_DT
      ,a.CONT_FIN_COA_CD
      ,a.CONT_ACCOUNT_NBR
      ,a.ENDOW_FIN_COA_CD
      ,a.ENDOW_ACCOUNT_NBR
      ,a.CONTR_CTRL_FCOA_CD
      ,a.CONTR_CTRLACCT_NBR
      ,a.INCOME_FIN_COA_CD
      ,a.INCOME_ACCOUNT_NBR
      ,a.ACCT_ICR_TYP_CD
      ,a.AC_CSTM_ICREXCL_CD
      ,a.FIN_SERIES_ID
      ,a.ICR_FIN_COA_CD
      ,a.ICR_ACCOUNT_NBR
      ,a.ACCT_IN_FP_CD
      ,a.BDGT_REC_LVL_CD
      ,a.ACCT_SF_CD
      ,a.ACCT_PND_SF_CD
      ,a.FIN_EXT_ENC_SF_CD
      ,a.FIN_INT_ENC_SF_CD
      ,a.FIN_PRE_ENC_SF_CD
      ,a.FIN_OBJ_PRSCTRL_CD
      ,a.CG_CFDA_NBR
      ,a.ACCT_OFF_CMP_IND
      ,a.ACCT_CLOSED_IND
      ,CG_ACCT_RESP_ID
      ,b.UC_LOC_CD
      ,b.UC_ACCT_NBR
      ,b.UC_FUND_NBR
      ,b.UCI_CAPITAL_CAT_CD
FROM ca_account_t a
LEFT OUTER JOIN ca_account_ext_t b on (a.FIN_COA_CD = b.FIN_COA_CD and a.ACCOUNT_NBR = b.ACCOUNT_NBR)
WHERE
  a.ACCT_CLOSED_IND <> 'Y'
  AND (a.ACCT_EXPIRATION_DT >= getdate() or a.ACCT_EXPIRATION_DT IS NULL)
  AND (a.ACCT_EFFECT_DT <= GETDATE())

...