create or replace procedure mini as
acno number:=&acno;
txnno varchar2(20);
mdate date:=&mdate;
cou number;
cdno varchar(16);
cid number;
bal number;
v daily_transactions%rowtype;
cursor c1 is select * from daily_transactions where cdno=(select cardno from card_master5064 where cin=(select cin from customer_master where accno=acno));
begin
select count(*) into cou from customer_master where accno=acno;
select cin,balance into cid,bal from customer_master where accno=acno;
select cardno into cdno from card_master where cin=cid;
if(cou>0) then
open c1;
loop
fetch c1 into v;
exit when c1%notfound;
dbms_output.put_line(v.cardno||v.trandate||v.balance||v.deposit||v.withdraw);
end loop;
close c1;
dbms_output.put_line('Total Balance Is:'||bal);
select to_char(mdate,'ddmmyyyyhhmiss')||transeq.nextval into txnno from dual;
insert into daily_transactions values(cdno,mdate,bal,0,0,txnno);
commit;
else
dbms_output.put_line('Account Number Does Not Exist');
end if;
Subscribe to:
Post Comments (Atom)
MY HIT COUNTER
Blog Archive
-
▼
2009
(38)
-
▼
November
(27)
- few programs on bank project
- customer identification number
- bank programs
- min balance program in oracle
- cards balance
- real time programs in bank project
- real time registration example
- Creation of tables in oracle
- practice quries
- quries
- reverse number
- throws exception
- throws exception
- divide by zero
- array index
- length of a string name
- no parameters to string
- print two parameters
- abstract class in core java
- inside area of rectangle
- area of rectangle
- three string parameters
- class b extends a
- incremeting numbers
- sum of three parameters
- box program
- strings
-
▼
November
(27)
Custom Search
No comments:
Post a Comment