SELECT a.business_unit , a.cashier_office , c.cashier , b.tender_key ,b.language_cd , b.descr FROM ps_csh_off_cashier a , ps_TENDER_KEY_LNG b , ps_tender_cshr_tbl c WHERE a.business_unit = b.business_unit AND a.cashier = c.cashier AND b.business_unit = c.business_unit AND b.tender_key = c.tender_key AND b.effdt = c.effdt AND b.effdt = ( SELECT MAX(bb.effdt) FROM ps_TENDER_KEY_LNG bb ,PS_TENDER_KEY_TBL Y WHERE b.business_unit = bb.business_unit AND b.tender_key = bb.tender_key AND bb.effdt <= %CurrentDateIn AND Y.eff_status = 'A' AND bb.BUSINESS_UNIT=Y.BUSINESS_UNIT AND bb.TENDER_KEY=Y.TENDER_KEY AND bb.EFFDT=Y.EFFDT)
|