t_c_b_s之儲存過程寫法小記
採用plsql特殊型別及引數遊標來運算元據如下:lvnLoopCtr := 1;
OPEN curs_GetFundInfo(lvnAcctNbr, lvnRTXNNbr);--引數遊標
LOOP
FETCH curs_GetFundInfo
INTO lvsFundTypCd,
lvsFundTypDtlCd,
lvsClearCatCd,
lvnSeqNbr,
lvnNbrOfItems,
lvnAmt;
EXIT WHEN curs_GetFundInfo%NOTFOUND;
lvasFundTypCd(lvnLoopCtr) := lvsFundTypCd; --plsql記錄型別
lvasFundTypDtlCd(lvnLoopCtr) := lvsFundTypDtlCd;
lvasClearCatCd(lvnLoopCtr) := lvsClearCatCd;
lvanSeqNbr(lvnLoopCtr) := lvnSeqNbr;
lvanNbrOfItems(lvnLoopCtr) := lvnNbrOfItems;
lvanFundsAmt(lvnLoopCtr) := lvnAmt;
lvnFundTypArraySize := lvnLoopCtr;
lvnLoopCtr := lvnLoopCtr + 1;
END LOOP;
CLOSE curs_GetFundInfo;rtxnrptgrprtxntyp表為何義?receipt收據;檢視儲存過程PROC_ED_CALCDEPOSITACCRUEDINT;intraterecalcmeth表是利息利率重新計算方法表;混合利率及複合利率;ratechangemeth利率變化方法表,On Cycle及Calendar Period;利率改變方法;LEAP YEAR;
檢視此儲存過程PACK_NEWDISB;
SELECT A.MjAcctTypCd,
A.CurrMiAcctTypCd,
A.DateLastMaint,
A.CurrAcctStatCd,
A.NextSubNbr,
A.CurrAcctStatCd,
B.AccrThruDueDateYN,
C.BillAdvanceYN,
B.PmtCalcIncludeOddDaysYN,
C.Date1stPmtDue,
B.OddDaysMethCd,
-- B.PassbookLoanYN, C.RevolveLoanYN, C.LoanLimitYN
B.PassbookLoanYN,
C.RevolveLoanYN,
C.LoanLimitYN,
B.RnewAllowedYN,
A.ContractDate --Modified By RSI on 07-20-2005 for Issue# 0069-346
INTO lvsMjAcctTypCd,
lvsMiAcctTypCd,
lvdtAcctDateLastMaint,
lvsAcctStatCd,
lvnNextSubAcctNbr,
lvsCurrAcctStatCd,
lvsAccrThruDueDateYN,
lvsBillAdvanceYN,
lvsPmtCalcIncludeOddDaysYN,
lvdFirstDueDate,
lvsOddDaysMethCd,
-- lvsPassBookLoanYN, lvsRevolveLoanYN, lvsLoanLimitYN
lvsPassBookLoanYN,
lvsRevolveLoanYN,
lvsLoanLimitYN,
lvsRnewAllowedYN,
lvdContractDate --Modified By RSI on 07-20-2005 for Issue# 0069-346
FROM Acct A, MjMiAcctTyp B, AcctLoan C
WHERE A.AcctNbr = in_ACCTNBR
AND B.MjAcctTypCd = A.MjAcctTypCd
AND B.MiAcctTypCd = A.CurrMiAcctTypCd
AND C.AcctNbr = A.AcctNbr
FOR UPDATE;--排它賦值 select into for update
此種寫法;lvbIntExists := (lvnExistsCount > 0);--變數的賦值為一個表示式,此表示式的結果為布林值false or true
OPEN curs_GetFundInfo(lvnAcctNbr, lvnRTXNNbr);--引數遊標
LOOP
FETCH curs_GetFundInfo
INTO lvsFundTypCd,
lvsFundTypDtlCd,
lvsClearCatCd,
lvnSeqNbr,
lvnNbrOfItems,
lvnAmt;
EXIT WHEN curs_GetFundInfo%NOTFOUND;
lvasFundTypCd(lvnLoopCtr) := lvsFundTypCd; --plsql記錄型別
lvasFundTypDtlCd(lvnLoopCtr) := lvsFundTypDtlCd;
lvasClearCatCd(lvnLoopCtr) := lvsClearCatCd;
lvanSeqNbr(lvnLoopCtr) := lvnSeqNbr;
lvanNbrOfItems(lvnLoopCtr) := lvnNbrOfItems;
lvanFundsAmt(lvnLoopCtr) := lvnAmt;
lvnFundTypArraySize := lvnLoopCtr;
lvnLoopCtr := lvnLoopCtr + 1;
END LOOP;
CLOSE curs_GetFundInfo;rtxnrptgrprtxntyp表為何義?receipt收據;檢視儲存過程PROC_ED_CALCDEPOSITACCRUEDINT;intraterecalcmeth表是利息利率重新計算方法表;混合利率及複合利率;ratechangemeth利率變化方法表,On Cycle及Calendar Period;利率改變方法;LEAP YEAR;
檢視此儲存過程PACK_NEWDISB;
SELECT A.MjAcctTypCd,
A.CurrMiAcctTypCd,
A.DateLastMaint,
A.CurrAcctStatCd,
A.NextSubNbr,
A.CurrAcctStatCd,
B.AccrThruDueDateYN,
C.BillAdvanceYN,
B.PmtCalcIncludeOddDaysYN,
C.Date1stPmtDue,
B.OddDaysMethCd,
-- B.PassbookLoanYN, C.RevolveLoanYN, C.LoanLimitYN
B.PassbookLoanYN,
C.RevolveLoanYN,
C.LoanLimitYN,
B.RnewAllowedYN,
A.ContractDate --Modified By RSI on 07-20-2005 for Issue# 0069-346
INTO lvsMjAcctTypCd,
lvsMiAcctTypCd,
lvdtAcctDateLastMaint,
lvsAcctStatCd,
lvnNextSubAcctNbr,
lvsCurrAcctStatCd,
lvsAccrThruDueDateYN,
lvsBillAdvanceYN,
lvsPmtCalcIncludeOddDaysYN,
lvdFirstDueDate,
lvsOddDaysMethCd,
-- lvsPassBookLoanYN, lvsRevolveLoanYN, lvsLoanLimitYN
lvsPassBookLoanYN,
lvsRevolveLoanYN,
lvsLoanLimitYN,
lvsRnewAllowedYN,
lvdContractDate --Modified By RSI on 07-20-2005 for Issue# 0069-346
FROM Acct A, MjMiAcctTyp B, AcctLoan C
WHERE A.AcctNbr = in_ACCTNBR
AND B.MjAcctTypCd = A.MjAcctTypCd
AND B.MiAcctTypCd = A.CurrMiAcctTypCd
AND C.AcctNbr = A.AcctNbr
FOR UPDATE;--排它賦值 select into for update
此種寫法;lvbIntExists := (lvnExistsCount > 0);--變數的賦值為一個表示式,此表示式的結果為布林值false or true
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-702678/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- t_c_b_s之儲存過程plsql record型別小記_while loop儲存過程SQL型別WhileOOP
- t_c_b_s之後臺儲存過程_更新表間關係小記儲存過程
- t_c_b_s之儲存過程註解小摘_英語儲存過程
- t_c_b_s之儲存過程架構儲存過程架構
- 近期編寫tcbs儲存過程小記(1)儲存過程
- c#呼叫儲存過程小記C#儲存過程
- t_c_b_s之代發工資業務流程_儲存過程異常儲存過程
- 儲存過程語法儲存過程
- 小寫轉大寫金額儲存過程[SQL SERVER]儲存過程SQLServer
- 編寫JAVA儲存過程Java儲存過程
- Oracle儲存過程中跳出迴圈的寫法Oracle儲存過程
- 儲存過程基本語法儲存過程
- MySQL之儲存過程MySql儲存過程
- oracle10g_儲存過程學習小記Oracle儲存過程
- oracle儲存過程書寫格式Oracle儲存過程
- mysql儲存過程小試牛刀MySql儲存過程
- Oracle儲存過程基本語法Oracle儲存過程
- sql server儲存過程語法SQLServer儲存過程
- MyBatis 示例之儲存過程MyBatis儲存過程
- 在儲存過程中寫truncate table儲存過程
- Oracle Pl/SQL 之 儲存過程OracleSQL儲存過程
- MySQL儲存過程詳解 mysql 儲存過程MySql儲存過程
- 儲存過程儲存過程
- oracle儲存過程(procedure)中執行動態SQL小記Oracle儲存過程SQL
- MySQL的寫入資料儲存過程MySql儲存過程
- 編寫儲存過程基本注意事項儲存過程
- Oracle儲存過程優化小實踐Oracle儲存過程優化
- MySql儲存過程的作用及語法MySql儲存過程
- Oracle 儲存過程加密之wrap工具Oracle儲存過程加密
- SQL Server基礎之儲存過程SQLServer儲存過程
- SQL 儲存過程裡呼叫另一個儲存過程SQL儲存過程
- MySQL儲存過程詳解 mysql 儲存過程linkMySql儲存過程
- Oracle儲存過程乾貨(一):儲存過程基礎Oracle儲存過程
- 儲存過程與儲存函式儲存過程儲存函式
- Oracle儲存過程Oracle儲存過程
- 使用儲存過程儲存過程
- sybase儲存過程儲存過程
- java儲存過程Java儲存過程