SELECT a.business_unit , a.ledger , c.descr , b.calendar_id , e.open_year_from , e.open_period_from , f.open_year_to , f.open_period_to FROM ps_bu_led_tbl a , PS_BU_LED_GRP_TBL b , ps_led_defn_tbl c , ps_fin_open_min_vw e , ps_fin_open_max_vw f WHERE b.business_unit = a.business_unit AND b.ledger_group = a.ledger_group AND b.balanced_ledger = 'N' AND c.setid = ( SELECT setid FROM ps_set_cntrl_rec d WHERE d.setcntrlvalue = a.business_unit AND d.recname = 'LED_DEFN_TBL') AND c.ledger = a.ledger AND c.ledger_type = 'D' AND e.business_unit = b.business_unit AND e.ledger_group = b.ledger_group AND f.business_unit = b.business_unit AND f.ledger_group = b.ledger_group
|