how to write a procedure for following query [message #283335] |
Mon, 26 November 2007 14:36 |
enemies
Messages: 1 Registered: November 2007 Location: united states
|
Junior Member |
|
|
hii am new to oracle , can any one help me how to write a procedure for following one , juzz tell me the logic how to use ....
[1]Transfer Funds between Accounts:
Table: AccountMaster (AcctNo (primary key), AcctHolderName, currentBal
Data: 1, 'A', 1000
2, 'B', 3000
3, 'C', 4000
Function: getBalance (AcctNo)
Stored Proc: tranferFunds (FromAcctNo IN, ToAcctNo IN, Amt IN, result OUT)
The proc should use the function getBalance (AcctNo) to find out the current balance for account.
The proc should return a value of 1 if the transfer was successful.
It should return a value of -1 if the funds are not sufficient in the fromAccount to transfer.
thanx ,
Raj0412
|
|
|
|