t_Interval      := trunc(to_number(sysdate - t_Interval_temp) / 365,0);
      t_cursor_sql    := DBMS_SQL.OPEN_CURSOR;
      
      select count(1) into t_Fxflag from lmcalmode  
             where calcode like 'IFX%' and riskcode = t_Riskcode;
      if (t_FxFlag > 0) then
         select calsql into t_sql from lmcalmode  
             where calcode like 'IFX%' and riskcode = t_Riskcode;
          t_sql := REPLACE(trim(t_sql), '?DutyCode?', trim(t_DutyCode));
    
          DBMS_SQL.PARSE(t_cursor_sql, t_sql, DBMS_SQL.native);          DBMS_SQL.DEFINE_COLUMN(t_cursor_sql, 1, t_temp_SumAmnt);          t_temp := DBMS_SQL.EXECUTE(t_cursor_sql);
    
          LOOP            IF DBMS_SQL.FETCH_ROWS(t_cursor_sql) > 0 THEN
              DBMS_SQL.COLUMN_VALUE(t_cursor_sql, 1, t_temp_SumAmnt);
              IF t_temp_SumAmnt is not null and t_temp_SumAmnt > 0 THEN
                tRiskAmnt := tRiskAmnt + t_temp_SumAmnt;
              END IF;
            ELSE            
                EXIT;
            END IF;
          END LOOP;
          DBMS_SQL.CLOSE_CURSOR(t_cursor_sql);
       else
           tRiskAmnt := tRiskAmnt + t_Amnt;
       end if;      
    end if;
小弟实在是搞不懂,请高手们指教~~谢啦!!