t_c_b_s之儲存過程plsql record型別小記_while loop

wisdomone1發表於2011-07-21
lvnIdx := in_BALCATCD.FIRST;--初始供值
 WHILE lvnIdx IS NOT NULL LOOP --while loop cycle

  lvsActvMsg := 'Getting BalAmt at idx ' || lvnIdx; --logging for debug
  lvnBalAmt := in_BALAMT( lvnIdx );--plsql specific give value

  IF lvnBalAmt <> 0 THEN --condition style
   lvnAdjAmt := lvnBalAmt;
   lvsActvMsg := 'Getting BalCat at idx ' || lvnIdx; --same as above the 3 line
   lvsBalCatCd := in_BALCATCD( lvnIdx ); --plsql type var give value
   lvsActvMsg := 'Getting BalTyp at idx ' || lvnIdx;
   lvsBalTypCd := in_BALTYPCD( lvnIdx );
  END IF;

  lvnIdx := in_BALCATCD.NEXT( lvnIdx ); --cycle var add 1
 END LOOP; --cycle endding

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-702769/,如需轉載,請註明出處,否則將追究法律責任。

相關文章