Versions Compared

Key

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

...

Code Block
SELECT 
CONVERT(varchar(4), a.univ_fiscal_yr) AS UNIV_FISCAL_YR,
a.fin_coa_cd, 
a.account_nbr, 
a.fin_object_cd, 
b.fin_obj_cd_nm, 
a.fin_sub_obj_cd, 
a.fin_sub_obj_cd_nm 
FROM CA_SUB_OBJECT_CD_T a LEFT OUTTEROUTER JOIN CA_OBJECT_CODE_T b ON a.fin_object_cd = b.fin_object_cd  
WHERE a.FIN_SUBOBJ_ACTV_CD <> 'N' AND
(
 (a.univ_fiscal_yr = '2012' AND 
  a.fin_coa_cd='IR' AND 
  a.account_nbr='1000211' AND 
  a.fin_object_cd = '4400' AND 
  a.fin_sub_obj_cd = 'BRM1') OR 
 (a.univ_fiscal_yr = '2012' AND 
  a.fin_coa_cd='IR' AND 
  a.account_nbr='1000211' AND 
  a.fin_object_cd = '4400' AND 
  a.fin_sub_obj_cd = 'ITM1') OR
 (a.univ_fiscal_yr = '2012' AND
  a.fin_coa_cd='IR' AND 
  a.account_nbr='1000211' AND 
  a.fin_object_cd = '0000' AND 
  a.fin_sub_obj_cd = 'XXXX')
);

...

Code Block
SELECT 
CONVERT(varchar(4), a.univ_fiscal_yr) AS UNIV_FISCAL_YR,
a.fin_coa_cd, 
a.account_nbr, 
a.fin_object_cd, 
b.fin_obj_cd_nm, 
a.fin_sub_obj_cd, 
a.fin_sub_obj_cd_nm 
FROM CA_SUB_OBJECT_CD_T a LEFT OUTTEROUTER JOIN CA_OBJECT_CODE_T b ON a.fin_object_cd = b.fin_object_cd  
WHERE a.FIN_SUBOBJ_ACTV_CD <> 'N';

...