= $advancedCriteria.EFFECTIVE_DT order by rate.rate_no, rate.beg_eff_dt) rates, (Select $advancedCriteria.RATE_SET_CD as RATE_SET_CD, rc1_occur_no, rc2_occur_no, rc3_occur_no, rc4_occur_no, Rownum rownumber from (select rc1.rc_occur_no rc1_occur_no, rc2.rc_occur_no rc2_occur_no, rc3.rc_occur_no rc3_occur_no, rc4.rc_occur_no rc4_occur_no From rc_rng rc1 ,rc_rng rc2 ,rc_rng rc3 ,rc_rng rc4 where rc1.rc_type_id = (select rc_type_id from rc_comb where rc_comb_id = (select rc_comb_id from rate_set_def where rate_set_cd = $advancedCriteria.RATE_SET_CD) and rc_seq_no = 1) and rc2.rc_type_id = (select rc_type_id from rc_comb where rc_comb_id = (select rc_comb_id from rate_set_def where rate_set_cd = $advancedCriteria.RATE_SET_CD) and rc_seq_no = 2) and rc3.rc_type_id = (select rc_type_id from rc_comb where rc_comb_id = (select rc_comb_id from rate_set_def where rate_set_cd = $advancedCriteria.RATE_SET_CD) and rc_seq_no = 3) and rc4.rc_type_id = (select rc_type_id from rc_comb where rc_comb_id = (select rc_comb_id from rate_set_def where rate_set_cd = $advancedCriteria.RATE_SET_CD) and rc_seq_no = 4) order by rc1.rc_occur_no ,rc2.rc_occur_no ,rc3.rc_occur_no ,rc4.rc_occur_no )) rcs Where rcs.rownumber = rates.rate_no (+) and ($defaultWhereClause) order by rcs.rownumber ]]>