Home » Other » Training & Certification » how to write a procedure for following query
how to write a procedure for following query [message #283335] Mon, 26 November 2007 14:36 Go to next message
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
Re: how to write a procedure for following query [message #283337 is a reply to message #283335] Mon, 26 November 2007 14:55 Go to previous message
Michel Cadot
Messages: 68637
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Post your topic in Homework forum and not in PL/SQL Expert, above all if you are new.

Post what you already did. We don't do homework for you, we just may help you.

Regards
Michel
Previous Topic: Foreign key problem
Next Topic: Oracle/ Sqlplus help
Goto Forum:
  


Current Time: Tue Apr 16 11:46:34 CDT 2024