458: l_diff NUMBER;
459: --
460: cursor GET_LOWER_RATE is
461: select (a.BID_PRICE + a.ASK_PRICE) / 2,a.NOS_OF_DAYS
462: from XTR_YIELD_CURVE_DETAILS a
463: where a.CURRENCY = l_ccy
464: and a.GROUP_CODE = l_yield_curve
465: and a.NOS_OF_DAYS =
466: (select max(c.NOS_OF_DAYS)
463: where a.CURRENCY = l_ccy
464: and a.GROUP_CODE = l_yield_curve
465: and a.NOS_OF_DAYS =
466: (select max(c.NOS_OF_DAYS)
467: from XTR_YIELD_CURVE_DETAILS c
468: where c.GROUP_CODE = l_yield_curve
469: and c.CURRENCY = l_ccy
470: and c.NOS_OF_DAYS < l_days);
471: --
470: and c.NOS_OF_DAYS < l_days);
471: --
472: cursor GET_HIGHER_RATE is
473: select (a.BID_PRICE + a.ASK_PRICE) / 2,a.NOS_OF_DAYS
474: from XTR_YIELD_CURVE_DETAILS a
475: where a.CURRENCY = l_ccy
476: and a.GROUP_CODE = l_yield_curve
477: and a.NOS_OF_DAYS =
478: (select max(c.NOS_OF_DAYS)
475: where a.CURRENCY = l_ccy
476: and a.GROUP_CODE = l_yield_curve
477: and a.NOS_OF_DAYS =
478: (select max(c.NOS_OF_DAYS)
479: from XTR_YIELD_CURVE_DETAILS c
480: where c.GROUP_CODE = l_yield_curve
481: and c.CURRENCY = l_ccy
482: and c.NOS_OF_DAYS >= l_days);
483: --